Shop OBEX P1 Docs P2 Docs Learn Events
[New Test] AJAX, LED, IP Cam and Spinneret - Page 2 — Parallax Forums

[New Test] AJAX, LED, IP Cam and Spinneret

2»

Comments

  • BocephusBocephus Posts: 58
    edited 2011-01-07 14:32
    Mike G wrote: »
    Congrats Bocephus, another successful crash... well restart. lol

    It's the HTML decode code, I never put that many spaces in the querystring. Back to the drawling board.

    Oops!!
  • Mike GMike G Posts: 2,702
    edited 2011-01-07 14:40
    Actually its another stack overflow problem but in the dynamic file generator this time. Thank you for your help. I have everything logged so... more work to do. My wife's real happy about that.
  • Mike GMike G Posts: 2,702
    edited 2011-01-08 14:50
    Anyone up for a quick test? AJAX, Web Camera, and Spinneret LED.

    http://forums.parallax.com/showthread.php?128600-AJAX-Spinneret-LED-Demo-and-IP-Camera
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-08 15:24
    Mike,

    I just retried POST on a WinXP machine (Opera), but with nil results. I put a sniffer on the connection, so I could see exactly what was being sent. Here it is:
    POST /login.shp HTTP/1.1
    User-Agent: Opera/9.80 (Windows NT 5.1; U; en) Presto/2.6.30 Version/10.63
    Host: spinneret.servebeer.com:5000
    Accept: text/html, application/xml;q=0.9, application/xhtml+xml, image/png, image/jpeg, image/gif, image/x-xbitmap, */*;q=0.1
    Accept-Language: en-US,en;q=0.9
    Accept-Charset: iso-8859-1, utf-8, utf-16, *;q=0.1
    Accept-Encoding: deflate, gzip, x-gzip, identity, *;q=0
    Referer: http://spinneret.servebeer.com:5000/login.shp
    Connection: Keep-Alive, TE
    TE: deflate, gzip, chunked, identity, trailers
    Content-Length: 40
    Content-Type: application/x-www-form-urlencoded
    
    username=test&password=123&submit=Submit
    

    Firefox works fine. Here's what it sent:
    POST /login.shp HTTP/1.1
    Host: spinneret.servebeer.com:5000
    User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.9.2.13) Gecko/20101203 Firefox/3.6.13
    Accept: text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8
    Accept-Language: en-us,en;q=0.5
    Accept-Encoding: gzip,deflate
    Accept-Charset: ISO-8859-1,utf-8;q=0.7,*;q=0.7
    Keep-Alive: 115
    Connection: keep-alive
    Referer: http://spinneret.servebeer.com:5000/login.shp
    Content-Type: application/x-www-form-urlencoded
    Content-Length: 40
    
    username=test&password=123&submit=Submit
    

    It looks like the Content-Type and Content-Length lines are swapped between the two. I suspect you might be counting characters right after Content-Length instead of after the blank line. Right?

    -Phil
  • Mike GMike G Posts: 2,702
    edited 2011-01-08 15:32
    Thanks Phil that helps. I thought it was a Linux/Windows issue, looks like it's browser related. I was able to reproduce the issue.
  • Mike GMike G Posts: 2,702
    edited 2011-01-08 15:41
    @Phil It's kinda' weird. Opera causes an error when sending a post. So, the header request is never processed. It looks like the request is empty, 0 bytes but the page eventually renders. It must have something to so with my HttpRequest object or timeout logic.

    To find the body, I'm looking for a \n\n or \r\n\r\n
  • Phil Pilgrim (PhiPi)Phil Pilgrim (PhiPi) Posts: 23,514
    edited 2011-01-08 16:33
    I just checked, and both Opera and Firefox send \r\n at the end of each HTTP line.

    -Phil
Sign In or Register to comment.