Groups | Search | Server Info | Keyboard shortcuts | Login | Register


Groups > de.comp.lang.javascript > #5106

Re: HTTP POST?

From Thomas 'PointedEars' Lahn <PointedEars@web.de>
Newsgroups de.comp.lang.javascript
Subject Re: HTTP POST?
Date 2019-06-10 21:45 +0200
Organization PointedEars Software (PES)
Message-ID <5261878.DvuYhMxLoT@PointedEars.de> (permalink)
References (7 earlier) <qdipfo.1rg.1@stefan.msgid.phost.de> <qdisp1$383$1@news2.informatik.uni-stuttgart.de> <qdle64.4rs.1@stefan.msgid.phost.de> <gm7bqoFsrrjU1@mid.individual.net> <qdm0l9$sm7$1@news2.informatik.uni-stuttgart.de>

Show all headers | View raw


Ulli Horlacher wrote:

> 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).

<https://tools.ietf.org/html/rfc2616>
<https://tools.ietf.org/html/rfc7230#appendix-A.1.2>

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:

<https://tools.ietf.org/html/rfc2616#section-8.1.4>
<https://en.wikipedia.org/wiki/HTTP_persistent_connection#Use_in_web_browsers>

>> 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:

<https://thenewstack.io/http-3-replaces-tcp-with-udp-to-boost-network-speed-reliability/>

(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: <http://PointedEars.de/faq> | <http://PointedEars.de/es-matrix>
<https://github.com/PointedEars> | <http://PointedEars.de/wsvn/>
Twitter: @PointedEars2 | Please do not cc me./Bitte keine Kopien per E-Mail.

Back to de.comp.lang.javascript | Previous | NextPrevious in thread | Next in thread | Find similar


Thread

HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-05-31 18:04 +0000
  Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-05-31 21:03 +0200
    Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-01 13:18 +0200
      Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-01 14:15 +0200
        Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-01 14:34 +0200
          Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-01 14:37 +0200
          Re: HTTP POST? Ralph Aichinger <ra@pi.h5.or.at> - 2019-06-01 15:11 +0200
            Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-01 15:44 +0200
            Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-01 16:07 +0200
              Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-01 20:17 +0200
          Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-01 18:43 +0200
            Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-01 20:19 +0200
              Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-01 22:45 +0200
                Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-02 05:02 +0200
                Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-02 18:05 +0200
                Re: HTTP POST? Claus Reibenstein <4spamersonly@kabelmail.de> - 2019-06-02 09:37 +0200
                Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-02 13:39 +0200
                Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-02 18:12 +0200
              Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-02 04:06 +0200
                Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-02 18:22 +0200
      Re: HTTP POST? Jan Novak <repcom@gmail.com> - 2019-06-03 14:54 +0200
  Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-02 10:44 +0000
    Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-02 14:00 +0200
    Re: HTTP POST? Stefan Reuther <stefan.news@arcor.de> - 2019-06-02 17:14 +0200
      Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-02 21:02 +0000
        Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-03 00:06 +0200
          Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-03 00:47 +0200
            Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-03 06:06 +0000
              Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-03 18:43 +0200
        Re: HTTP POST? Claus Reibenstein <4spamersonly@kabelmail.de> - 2019-06-03 12:38 +0200
          Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-03 15:51 +0200
            Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-03 20:26 +0000
              Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-04 19:31 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-05 06:09 +0000
            Re: HTTP POST? Claus Reibenstein <4spamersonly@kabelmail.de> - 2019-06-04 21:48 +0200
              Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-05 06:14 +0000
        Re: HTTP POST? Stefan Reuther <stefan.news@arcor.de> - 2019-06-03 18:34 +0200
          Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-03 20:31 +0000
            Re: HTTP POST? Stefan Reuther <stefan.news@arcor.de> - 2019-06-04 18:09 +0200
              Re: HTTP POST? Manfred Haertel <Manfred.Haertel@rz-online.de> - 2019-06-05 05:50 +0200
              Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-05 06:30 +0000
                Re: HTTP POST? Ralph Aichinger <ra@pi.h5.or.at> - 2019-06-05 15:07 +0200
                Re: HTTP POST? Stefan Reuther <stefan.news@arcor.de> - 2019-06-05 18:09 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-05 20:25 +0000
                Re: HTTP POST? Claus Reibenstein <4spamersonly@kabelmail.de> - 2019-06-06 09:49 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-06 08:47 +0000
                Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-08 14:53 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-08 19:31 +0000
                Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-08 14:50 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-08 19:34 +0000
                Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-09 00:45 +0200
                Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-10 17:29 +0200
                Re: HTTP POST? Stefan Reuther <stefan.news@arcor.de> - 2019-06-09 11:10 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-09 12:06 +0000
                Re: HTTP POST? Stefan Reuther <stefan.news@arcor.de> - 2019-06-10 11:16 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-10 09:47 +0000
                Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-10 20:35 +0200
                Re: HTTP POST? Stefan Reuther <stefan.news@arcor.de> - 2019-06-11 17:50 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-11 20:02 +0000
                Re: HTTP POST? Ralph Aichinger <ra@pi.h5.or.at> - 2019-06-12 07:45 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-12 06:08 +0000
                Re: HTTP POST? Ralph Aichinger <ra@pi.h5.or.at> - 2019-06-12 10:16 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-12 09:05 +0000
                Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-12 10:37 +0200
                Re: HTTP POST? Stefan Reuther <stefan.news@arcor.de> - 2019-06-12 18:14 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-12 21:28 +0000
                Re: HTTP POST? Ralph Aichinger <ra@pi.h5.or.at> - 2019-06-12 23:55 +0200
                Re: HTTP POST? Manfred Haertel <Manfred.Haertel@rz-online.de> - 2019-06-13 05:35 +0200
                Re: HTTP POST? Ralph Aichinger <ra@pi.h5.or.at> - 2019-06-13 07:40 +0200
                Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-15 18:33 +0200
                Re: HTTP POST? Stefan Reuther <stefan.news@arcor.de> - 2019-06-14 18:08 +0200
                Re: HTTP POST? Claus Reibenstein <4spamersonly@kabelmail.de> - 2019-06-10 17:37 +0200
                Re: HTTP POST? Ulli Horlacher <framstag@rus.uni-stuttgart.de> - 2019-06-10 16:31 +0000
                Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-10 21:45 +0200
                Re: HTTP POST? Ralph Aichinger <ra@pi.h5.or.at> - 2019-06-10 22:04 +0200
                Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-11 00:23 +0200
                Re: HTTP POST? Ralph Aichinger <ra@pi.h5.or.at> - 2019-06-11 00:33 +0200
                Re: HTTP POST? Thomas 'PointedEars' Lahn <PointedEars@web.de> - 2019-06-11 01:01 +0200
                Re: HTTP POST? Ralph Aichinger <ra@pi.h5.or.at> - 2019-06-10 20:24 +0200
                Re: HTTP POST? Arno Welzel <usenet@arnowelzel.de> - 2019-06-11 10:48 +0200
                Re: HTTP POST? Claus Reibenstein <4spamersonly@kabelmail.de> - 2019-06-11 11:57 +0200

csiph-web