Hmm... I can take a guess that may point you in the right direction. My guess is that you're sending a bare bones cookie that for various reasons is being rejected by the iOS browser (is that Safari?). Now, my guess is that you're sending a bare minimum cookie that exists of only the 'Name=Value' form the Netburner (this is what I would probably do, until proven wrong). There's a few things I'd suggest adding to your cookie string:
- 'Expires' or 'Max-age' token.
- A 'Domain' token. If the device is being accessed by its IP address, this is simply the IP address; if it's being accessed by DNS, you'll need to be able to either set a 'hostname', or look for the 'Request-URL' in the http request and parse out the domain from that.
- If the page/site in question is being served up over SSL, the browser may required the cookie to be marked 'Secure'.
You probably also want to look at
RFC 6265, specifically the section on
Server Requirements (if you haven't already). It might also interest you to take a look at
RFC 1945, which defines the HTTP/1.0 standard (note: the Netburner webserver only supports HTTP/1.0).
Last, as a side note, 'SendHTMLHeaderWCookie' is defined as the following:
Code: Select all
void SendHTMLHeaderWCookie( int sock, char *cookie )
{
writestring( sock, "HTTP/1.0 200 OK\r\nPragma: no-cache\r\nSet-Cookie: " );
writesafestring( sock, cookie );
writestring( sock, "\r\nContent-Type: text/html\r\n\r\n" );
}
-Dan