Looks like removing the \r\n solves the problem. 

On Wednesday, August 27, 2014 1:14:40 PM UTC+2, Åke Hedman wrote:
>
> I try to set session variables in the MG_AUTH event and try to send
>
> sprintf( buf, "session=%s; max-age=3600; http-only\r\n", ret->m_sid );
> mg_send_header( conn, "Set-Cookie", buf );
> sprintf( buf, "user=%s\r\n", pUser );
> mg_send_header( conn, "Set-Cookie", buf );
>
> strcpy( buf, "original_url=/; max-age=0\r\n" );
> mg_send_header( conn, "Set-Cookie", buf );
>
> after a user has been validated (before MG_TRUE). But when I do this the 
> code sent back from the server looks something like this
>
> *Set-Cookie: user=admin*
>
> *Set-Cookie: original_url=/; max-age=0*
>
> *Transfer-Encoding: chunked*
>
> *1465*
> *...html of page to show..."*
>
> and after that the browser wait forever for the page. If I remove the 
> above code everything is fine. Looks like all of the page is treated as a 
> header. I obviously do something wrong but can't understand what. Any 
> pointers/hints are welcome.
>
> /Ake
>

-- 
You received this message because you are subscribed to the Google Groups 
"mongoose-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at http://groups.google.com/group/mongoose-users.
For more options, visit https://groups.google.com/d/optout.

Reply via email to