in reply to Re: LWP not returning leading spaces in web page (ver 2)
in thread LWP not returning leading spaces in web page (ver 2)

Interesting. I've tried modifying my LWP request to include all the headers you've shown but am still not receiving the leadings spaces.

I'm not sure where the LWP headers you show as "TE:" and "Connection:" are being inserted. I didn't think LWP would add these headers, but I could be wrong. I need to try out the fake web server code and experiment more.

Bottom line right now is, if anyone has other ideas I'd appreciate them.

Andy

@_="the journeyman larry disciple keeps learning\n"=~/(.)/gs, print(map$_[$_-77],unpack(q=c*=,q@QSdM[]uRMNV^[ni_\[N]eki^y@))

Replies are listed 'Best First'.
Re: Re:^2 LWP not returning leading spaces in web page (ver 2)
by poj (Abbot) on Feb 01, 2003 at 23:06 UTC
    Here is the server code I used
    #!/usr/bin/perl -w use strict; use HTTP::Daemon; my $server=HTTP::Daemon->new(Timeout => 10, LocalPort => 8989); while (my $client = $server->accept){ CONNECTION: while (my $answer = $client->get_request){ print $answer->as_string; open LOG,">>weblog.txt"; print LOG $answer->as_string;; close LOG; $client->autoflush; RESPONSE: while (<STDIN>) { last REPONSE if $_ eq ".\n"; last CONNECTION if $_ eq "..\n"; print $client $_; } print "\nEOF\n"; } print "CLOSE: ",$client->reason,"\n"; $client->close; undef $client; }
    poj