Has anyone coded a solution for this problem?
andrew melvin wrote:Your code also does not work for apple browsers... I figured out after a huge amount of head scratching why this it... it is true for safari, and browsers on iPad and phone. I kind of think having it work is fairly important...
what i noticed is that for POST requests... apple browsers send the first POST request, but it is empty... the second POST request contains nothing but the data, no headers... this is different from chrome and firefox where the payload is within the first POST request. I used a variable that was made true to scan the second POST request if the first one failed the string match!
Andrew, I know others have tugged at you as well - but I wondered if you are able to show how you overcome the Safari double POST issue. I've been trying to figure out a solution but not making any progress.
Thank you either way!
The issue seems to be a lack of header information sent in the request. Safari is very strict about the content you send, whereas Chrome (and most browsers for that matter) will kind of "fake it" if they don't receive exactly the correct information that they're looking for.
So to get this to work in Safari, just make sure to send a header before your page buffer:
client:send("HTTP/1.1 200 OK\r\n");