Re: Sending HTTP headers via plain sockets

2010-07-22 Thread MRAB
Navkirat Singh wrote: Aaah figured it out...!! It was elementary, I was lacking the carriage return and line feed characters at the end of the status and header line. Here is how I solved it: hostsock.send(b'HTTP/1.1 301 Moved Permanently\r\nLocation: http://www.example.com\r\n')

Re: Sending HTTP headers via plain sockets

2010-07-22 Thread Navkirat Singh
Aaah figured it out...!! It was elementary, I was lacking the carriage return and line feed characters at the end of the status and header line. Here is how I solved it: hostsock.send(b'HTTP/1.1 301 Moved Permanently\r\nLocation: http://www.example.com\r\n' ) Regards, Nav On 23-Jul-20