http Protocol violation
Jeffa
Posts: 80
More fiddling...
I noticed this problem at first with XML data I want for a wp7 application that was causing trouble in some testing I did in php with simpexml. Looking further I had the same problem with my main HTML page.
I received an HTTP protocol violation from my Spinneret project nerdDoro which is based on the work of Beau Schwabe http://forums.parallax.com/showthread.php?128385-Testing-Spinneret-Web-Server-outside-of-my-home-network (Seems like the Beau code would be a good inclusion on the code repository ??)
Note the fiddler Headers section circled in Red and the string "closeContent-Type:" highlighted in yellow.
I changed this code
the "W5100_Web_Page_Demo_indirect.spin" in the code repository exibits the same error.
I notice that the connection close is placed in a label indicating optional. In this code I don't believe the connection close is optional.
I noticed this problem at first with XML data I want for a wp7 application that was causing trouble in some testing I did in php with simpexml. Looking further I had the same problem with my main HTML page.
I received an HTTP protocol violation from my Spinneret project nerdDoro which is based on the work of Beau Schwabe http://forums.parallax.com/showthread.php?128385-Testing-Spinneret-Web-Server-outside-of-my-home-network (Seems like the Beau code would be a good inclusion on the code repository ??)
Note the fiddler Headers section circled in Red and the string "closeContent-Type:" highlighted in yellow.
I changed this code
htmlstart byte "HTTP/1.1 200 OK", CR, LF,0 '-------------------------------------------------------------------------------------- htmlopt 'byte "You have connected to PARELECTS Spinneret Web Server ... " 'byte "Next meeting is January 4th, 2011",CR 'byte "You connected to nerdDoro", CR, LF byte "Connection: close",CR byte "Content-Type: text/html", CR, LF,CR,LF,0 '-------------------------------------------------------------------------------------- html1 byte "<HTML>"to this adding LF to the Connection: close
htmlstart byte "HTTP/1.1 200 OK", CR, LF,0 '-------------------------------------------------------------------------------------- htmlopt 'byte "You have connected to PARELECTS Spinneret Web Server ... " 'byte "Next meeting is January 4th, 2011",CR 'byte "You connected to nerdDoro", CR, LF byte "Connection: close",CR, LF byte "Content-Type: text/html", CR, LF,CR,LF,0 '-------------------------------------------------------------------------------------- html1 byte "<HTML>"Looks better now.
the "W5100_Web_Page_Demo_indirect.spin" in the code repository exibits the same error.
'Send the web page - hardcoded here 'status lin StringSend(0, string("HTTP/1.1 200 OK")) StringSend(0, string(PST#NL, PST#LF)) 'optional header StringSend(0, string("Server: Parallax Spinneret Web Server/demo 1")) StringSend(0, string("Connection: close")) StringSend(0, string("Content-Type: text/html")) StringSend(0, string(PST#NL, PST#LF))
I notice that the connection close is placed in a label indicating optional. In this code I don't believe the connection close is optional.