Netcat ( nc -l ) as webserver

Emergency UNIX and Linux Support

Kindly Note - This is a Single User Post by Forum Member chakrapani Regarding:
Netcat ( nc -l ) as webserver.
Please Follow The Primary Link Above to View the Full Discussion.

Old 12-15-2016
chakrapani's Unix or Linux Image
chakrapani chakrapani is offline
Registered User
I made a named pipe and seems very close to getting my solution of garbing HTTP headers, Also noticed my browser does not Always send all the header each time.
(Chrome Version 54.0.2840.99 even in incognito )

My workaround (not solution) have a named pipe to communicated with nc.

$ mkfifo  webout

and then have the while loop to feed netcat(nc)

while true; do { echo -e 'HTTP/1.0 200 OK\r\n'; cat webout;  } | nc -vl 8080 >webout; done

I am just playing around with named pipe, looking to find something in the lines of:

nc -l PORT <webin > 2&1>webout

and then loop out with tail kind of thing on webin and webout. Any experts on FIFO's please suggest.

Last edited by chakrapani; 12-15-2016 at 10:50 AM.. Reason: typo