Re: [Ur] EUnurlify in code to be compiled to JavaScript[2]?

2017-04-30 Thread Adam Chlipala
Ah, that one's easy for me to spot.  Ur/Web doesn't support any 
interaction with cookies in client-side code.


On 04/21/2017 07:38 PM, Marko Schütz Schmuck wrote:


cookie auth : string
fun startSession (email : string) : transaction unit
   = setCookie auth {Value = email,
 Expires = None,
 Secure = False}

fun main () : transaction page
   = loggedIn <- source (None : option string);
 scUser <- source "";
 return 
   
   
 vu <- get scUser;
 rpc (startSession vu);
 c <- getCookie auth;
 case c of
 None => set loggedIn None
   | Some _ => set loggedIn (Some vu)}/>
   



___
Ur mailing list
Ur@impredicative.com
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur


Re: [Ur] fastCGI backend and POST /.msgs HTTP/1.1 requests

2017-04-30 Thread Adam Chlipala
I don't think I'm going to be able to look into this problem any time 
soon, but I'll be happy to accept a patch, if someone finds one.


On 04/14/2017 06:46 PM, Sergey Mironov wrote:

Yes, I am able to reproduce the error with the latest Ur/Web. I've
checked the related code and didn't find any obvious errors. But, if I
replace the following assignment
   o->r.requestIdB0 = current_request_id & 0x00ff;
with the assignment to 1, the error disappears.

Very strange.

Regards,
Sergey


2017-04-14 18:28 GMT+03:00 Benjamin Barenblat :

On Thu, Apr 13, 2017 at 6:35 PM, Sergey Mironov  wrote:

I am facing a problem running the application compiled in FastCGI mode
with nginx. The error on server says

2017/04/14 01:19:13 [error] 11847#0: *2 upstream sent unexpected
FastCGI request id low byte: 0 while reading response header from
upstream, client: 127.0.0.1, server: , request: "POST /.msgs
HTTP/1.1", upstream: "fastcgi://127.0.0.1:9000", host:
"127.0.0.1:8081", referrer: "http://127.0.0.1:8081/App/convertFile/48;

That sounds suspiciously like
. Are you running the latest
version of Ur/Web?


___
Ur mailing list
Ur@impredicative.com
http://www.impredicative.com/cgi-bin/mailman/listinfo/ur