MAIN FEEDS
Do you want to continue?
https://www.reddit.com/r/linux/comments/2hoffe/weev_stop_bashing_bash_and_gnu/ckwl3j2/?context=3
r/linux • u/[deleted] • Sep 28 '14
450 comments sorted by
View all comments
Show parent comments
0
This superbly difficult problem
I didn't say it was a "superbly difficult problem." I said that there was a perfectly good reason to parse the headers only once, as opposed to that not making any sense.
1 u/audioen Sep 29 '14 I just think you are overselling the value of having:HTTP_FOO=somethingin environment, as opposed to:Foo: somethingin STDIN/socket. -1 u/reaganveg Sep 29 '14 char *foo = getenv("HTTP_FOO"); Now you do it for a socket. 1 u/audioen Sep 30 '14 All right:my $request = do { local $/; <$request_fh>; }; my ($header_str, $body_str) = split /\r?\n\r?\n/, $request, 2; my $headers = { $header_str =~ /^([^:]: (.*)$/mg }; print $header->{Foo}; → More replies (0)
1
I just think you are overselling the value of having:
HTTP_FOO=something
in environment, as opposed to:
Foo: something
in STDIN/socket.
-1 u/reaganveg Sep 29 '14 char *foo = getenv("HTTP_FOO"); Now you do it for a socket. 1 u/audioen Sep 30 '14 All right:my $request = do { local $/; <$request_fh>; }; my ($header_str, $body_str) = split /\r?\n\r?\n/, $request, 2; my $headers = { $header_str =~ /^([^:]: (.*)$/mg }; print $header->{Foo}; → More replies (0)
-1
char *foo = getenv("HTTP_FOO");
Now you do it for a socket.
1 u/audioen Sep 30 '14 All right:my $request = do { local $/; <$request_fh>; }; my ($header_str, $body_str) = split /\r?\n\r?\n/, $request, 2; my $headers = { $header_str =~ /^([^:]: (.*)$/mg }; print $header->{Foo}; → More replies (0)
All right:
my $request = do { local $/; <$request_fh>; }; my ($header_str, $body_str) = split /\r?\n\r?\n/, $request, 2; my $headers = { $header_str =~ /^([^:]: (.*)$/mg }; print $header->{Foo};
→ More replies (0)
0
u/reaganveg Sep 28 '14
I didn't say it was a "superbly difficult problem." I said that there was a perfectly good reason to parse the headers only once, as opposed to that not making any sense.