4 ms·
"Which servers / sites support HTTP/1.1. pipelining?" There are probably millions. IME, over 20 years of using pipelining, it is quite rare to find ones that
by 1vuio0pswjnm7 5y ago
"Which servers / sites support HTTP/1.1. pipelining?"
There are probably millions. IME, over 20 years of using pipelining, it is quite rare to find ones that don't. Here is a simple example.
Download the k-tree transcript archive from stackexchange.com
1116 HTTP requests, 1 TCP connection
26MB download
stunnel -fd 0 << eof
debug=debug
pid=$HOME/1.pid
foreground=no
[ x ]
accept=127.0.0.77:80
client=yes
connect=198.252.206.29:443
options=NO_TICKET
options=NO_RENEGOTIATION
renegotiation=no
sni=
sslVersion=TLSv1.3
eof
export Connection=keep-alive;
sh -c "$(sh -c "$(seq -f "seq -f 'seq -f "https://chat.stackexchange.com/transcript/90748/%g/%%g/%%%%g" 1 31' 1 12" 2019 2021)")" \
|a.out \
|nc -vvn 127.77 80 > 1.htm
cd;kill $(cat 1.pid)
cat > 1.l
int yy_get_next_buffer();
int fileno(FILE *);
int setenv (const char *, const char *, int);
int dprintf(int, const char *__restrict, ...);
#define httpMethod "GET"
#define httpVersion "1.1"
#define Host ""
#define jmp BEGIN
#define Y(x,y) fprintf(stdout,x,y)
int count,path,ka;
int httpheaders(){
setenv("httpMethod",httpMethod,0);Y("%s ",getenv("httpMethod"));
Y("%s HTTP/",getenv("Path"));
setenv("httpVersion",httpVersion,0);Y("%s\r\n",getenv("httpVersion"));
if(0==setenv("Host","",0))Y("Host: %s\r\n",getenv("Host"));
if(getenv("Connection"))Y("Connection: %s\r\n",getenv("Connection"));
fputs("\r\n",stdout);
return 0;}
%option nounput noinput
%s xa xb xc
xa "http://"|"https://"
xb [-A-Za-z0-9.:]*
xc [^#'|<> \r\n]*
%%
^{xa} count++;setenv("Scheme",yytext,0);jmp xa;
<xa>{xb} setenv("Host",yytext,1);if(!getenv("Host"))setenv("Host",Host,0);jmp xb;
<xb>\n path=0;setenv("Path","/",0);httpheaders();jmp 0;
<xb>{xc} path=1;setenv("Path",yytext,1);httpheaders();jmp 0;
.|\n
%%
int main(){yylex();exit(0);}
int yywrap(){if(count>1){
fputs("GET /robots.txt HTTP/1.1\r\n",stdout);
Y("Host: %s\r\n",getenv("Host"));
fputs("Connection: close\r\n",stdout);
fputs("\r\n",stdout);};
exit(0);}
^D
flex 1.l
cc -std=c89 -Wall -pedantic -static -pipe lex.yy.c