Path: csiph.com!3.eu.feeder.erje.net!feeder.erje.net!news.albasani.net!.POSTED!not-for-mail From: Thomas 'PointedEars' Lahn Newsgroups: de.comp.lang.javascript Subject: Re: HTTP POST? Date: Mon, 10 Jun 2019 21:45:38 +0200 Organization: PointedEars Software (PES) Lines: 118 Message-ID: <5261878.DvuYhMxLoT@PointedEars.de> References: Reply-To: Thomas 'PointedEars' Lahn Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8Bit X-Trace: news.albasani.net qGV1ot2oFgbYY59aSQx5rYV6hOk9CWE3d2JpdesfOiYRzwSPlFN9qXaeUeDfoglEJD5NNoO8hNIEvZFmzrkYL0OVE2rURmHUKFlfKaF0jxisUfY3x36kQNr30/zrU15u NNTP-Posting-Date: Mon, 10 Jun 2019 19:45:39 +0000 (UTC) Injection-Info: news.albasani.net; logging-data="+m0y/9sqMgmnuOKGmGOXrBNSe2f4vKrgGISXibfr/YK/+pLYNXR2mW77kSJb1krJYlwZCip7QrK0Kbuv44knxTzbzFIFgpvMu0FVxK0tLPcCVbfc/x3mh0byYQ9TtkzH"; mail-complaints-to="abuse@albasani.net" User-Agent: KNode/4.14.10 Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwBAMAAAClLOS0AAAAGFBMVEXTxa4RFk5dUWANED8PFEfy7+MGBiW+n3ZNF/QuAAACaElEQVQ4jVXUwVOcMBQG8Dc7Rc4PUntdWV2uxjDpGaGeozOp1woar4jd5t/v9wLstMwsA/ntlxdCAgUc1hjTc9/JCZfGoo3wG3HdmdAWrIJRHe7GM/TmpY5VFefuVcAkkPbLIaN8rmPmjloyZxgyR3GuJ4K0AGtJ2htz8o7yqikm759fldQXaMpbDzjKAG+8v+AugVTOPO5DOjLvGtUYQwh0CPjnVMyGd+8/GfUB5nLKJDD2aLDh5HYyMDJGDwQIo2ZmZcKbowNmAdB/AzyFhrmF2MHRb0QJJfaAnwGB6orZhoykLzJtGwF/xpYxI1dswomiUj3gTuAIqCn/4C7cULwGNBtwMTk3Y4LfKB5YUaOKBKYtpplm7u0vip8tU1NWWyI/7XdcSuIDoMt6rVHMWT0DbjHPGqDqZVSa6zleLcUTcIKLoMv3ueJluALtAo9B302zPPlrtiVScRdCjXvVh3e3JpYa/jjkuC9N+LrBMlz/eAN4eQijX2EdLo6c5tGGHwLyHFtXk89dDGHwCVhG9T0S/j55AhRZgkMCmUQXJ49TnS1wnQDvw0eAh9ICeMmEFbCnPMFzjAvsWoEWEFdYEx+S0MoUZ1gT1wId8+AF3Bl2OoEu906AUHx5VLw/gXYg/x84loOah/2UYNrgiwSwGO7RfUzVBbx/kgpckumGOi6QirtD6gkLTitbnxNol47S2jVc2vsN5kPqaAHT8uUdAJM4v/DanjYOwmUjWznGfwB7sGtAtor5BgofDuzaRj4kSQAqDakTsKORa3Q3xKi3gE1fhl71KRMqrdZ2AWNNg/YOhQyrVBnb+i+nEg4bsDA+egAAAABJRU5ErkJggg== X-Face: %i>XG-yXR'\"2P/C_aO%~;2o~?g0pPKmbOw^=NT`tprDEf++D.m7"}HW6.#=U:?2GGctkL,f89@H46O$ASoW&?s}.k+&. Claus Reibenstein <4spamersonly@kabelmail.de> wrote: >> Stefan Reuther schrieb am 10.06.2019 um 11:16: >> > Fehlkonfigurationen ausgenommen wird kein Browser der letzten 20 Jahre >> > wirklich für jeden Request eine neue Verbindung aufbauen. >> >> HTTP ist nach meinen Informationen ein verbindungsloses Protokoll. Nein, HTTP ist vom *ursprünglichen* Design her ein _zustandsloses_ (stateless) Protokoll. („verbindungslos“ wäre „connectionless“; das gibt es nicht, weil das ein Widerspruch in sich wäre, siehe unten.) Dass HTTP “stateless“ ist, ist aber auch nur auf dem Application Layer richtig (und gilt deshalb für HTTP-Anwendungen wie REST), und uneingeschränkt auch nur bis HTTP/1.0 (RFC 1945). Denn HTTP/1.1 (RFC 2616 etc.) führt (AISB) “persistent connections” *per Default* ein (in HTTP/1.0 musste man das noch explizit per “Connection: keep-alive” wollen), d. h. für die Kommunikation mit einem Web-Server wird *einmalig* eine TCP-Verbindung aufgebaut, die dann für weitere Requests wiederverwendet werden kann (ausser der HTTP-Server sendet das Response-Headerfeld “Connection: close” oder beendet von sich aus die Verbindung). Beispiel für eine Verbindung mit *zwei* HTTP-Requests (kann man leicht selbst ausprobieren; die Zeilen, die auf HTTP/1.1 enden, und das Ctrl+C, habe ich von Hand eingegeben – normalerweise sendet ersteres ein Web- Browser): | $ telnet www.google.com http | Trying 172.217.168.4... | Connected to www.google.com. | Escape character is '^]'. | HEAD / HTTP/1.1 | | HTTP/1.1 200 OK | Date: Mon, 10 Jun 2019 19:29:18 GMT | Expires: -1 | Cache-Control: private, max-age=0 | Content-Type: text/html; charset=ISO-8859-1 | P3P: CP="This is not a P3P policy! See g.co/p3phelp for more info." | Server: gws | X-XSS-Protection: 0 | X-Frame-Options: SAMEORIGIN | Set-Cookie: 1P_JAR=2019-06-10-19; expires=Wed, 10-Jul-2019 19:29:18 GMT; | path=/; domain=.google.com | Set-Cookie: NID=185=ZYFYsEIbFedPlgQ6s6yCsvli- | MY5zXqcwVZFte9blbT8qvCVMWywX8G6YzFhrjUGp5GClqD_RaMmXYZTfn4Kmf4GtRkK7XAyu8O8CHBNj- | jfSN44b0aYFiAHzx_gP9cMm-isNNiV8jt62jpFeV1GMmV2xhMMFyiPJSZBbZ7DLtw; | expires=Tue, 10-Dec-2019 19:29:18 GMT; path=/; domain=.google.com; HttpOnly | Transfer-Encoding: chunked | Accept-Ranges: none | Vary: Accept-Encoding | | HEAD /groups HTTP/1.1 | | HTTP/1.1 302 Found | Location: https://groups.google.com/ | Cache-Control: private | Content-Type: text/html; charset=UTF-8 | X-Content-Type-Options: nosniff | Date: Mon, 10 Jun 2019 19:29:23 GMT | Server: sffe | Content-Length: 223 | X-XSS-Protection: 0 | | ^C | Connection closed by foreign host. | $ `---- Deshalb schrieb ich ja, dass die Behauptung, für weitere Requests gäbe es einen weiteren Overhead, heutzutage in der Regel Unsinn ist. Die Anzahl der Verbindungen, die ein Web-Browser bzw. dessen HTTP-Client offenhält, ist auch AFAIK keine Begrenzung bezogen auf alle TCP- Verbindungen, sondern auf alle Verbindungen zu *einem* HTTP-Server oder -Proxy: >> Heißt: Es wird überhaupt keine Verbindung aufgebaut. Vielmehr schickt >> der Browser einen oder mehrere Requests auf die Reise und lauscht auf >> seinen Ports auf Antworten. > > Das ist UNSINN. Nicht im allgemeinen, sondern nur hauptsächlich. > HTTP basiert auf tcp Nur ursprünglich (und es heisst _TCP_). > und das ist (im Gegensatz zu udp) ein verbindungsorientiertes Protokoll. Es gibt auch HTTP über _UDP_ (z. B. manchmal für Streaming und Downloads) und mit HTTP/3 (zuvor “HTTP-over-QUIC”) wird nur noch UDP verwendet werden: (vom 16. Januar 2019) > Das, was du beschreibst, gibt es nicht. Es gibt jedenfalls keine „verbindungslosen“ Netzwerkprotokolle, denn der Zweck eines Netzwerkprotokolls ist ja gerade der Verbindungsaufbau für die Herstellung der Kommunikation. -- PointedEars FAQ: | | Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.