On Friday, June 2, 2017 at 4:34:56 PM UTC-7, Dave S wrote:
>
>
>
> On Tuesday, May 30, 2017 at 11:15:46 PM UTC-7, Dave S wrote:
>>
>>
>>
>> On Tuesday, May 30, 2017 at 2:59:58 PM UTC-7, Marlysson Silva wrote:
>>>
>>> The request.requires_https() is written on top of models file once time..
>>>
>>> And to respect of redirect .. Could you use the absolute URL .. Create 
>>> completly 
>>>
>>> The doc of URL() have this..
>>>
>>
>> I went back to the model file with mixed results.  The first try, I had a 
>> typo that meant things were broken but I wasn't seeing the tickets right 
>> away.
>>
>> The mixed results: 
>>
>> A linux client, using libcurl, is reporting what seems to be a correct 
>> redirect now.  I still need to tell libcurl what to do with that. (Per 
>> libcurl recommendations, I'll use the rx'd URL as the new destination and 
>> retry the send; the option to automatically follow isn't recommended.)
>>
>
> Redir works for a browser (to an actual webpage, not a  
>
[I better finish this ...] 
I'm not using an api URL in the browser), and for a libcurl client to an 
api URL.

A winnders client, using wininet, just keeps sending to port 80. 
>>
> I'm trying to get tcpdump to tell me if the redirect is sent; my first 
>> attempts don't see it.
>>
>
> This is because the POST has to be completely sent before this technique 
> works, and my wininet clients don't seem to cleanly end the send.  Some 
> minutes after the client tells the user that it is done, Rocket throws up 
> its hands and says "broken pipe". (I've a group post about that, probably 
> sometime last year). 
>

Looks like that's about 10 minutes.  The POST DATA sits in a tmp file 
during that time; if my app accepts the data it gets moved into the uploads 
directory, if I don't (as when I'm trying to do a redir) it gets rm'd.
 

> For browsers and libcurl clients, the POST completes, the redir is sent, 
> the client uses the new URL, and and everyone lives happily ever after.
>
> Is there a way to tell Rocket to send the redir as soon as the URL is 
> received?  This is typically in the first packet after the connection 
> opening handshakes; does Rocket ever look at URLs, or is the routing 
> extracted at a higher level?  (My first read of rocket.py didn't clue me in 
> very far.)
>
>  
>>
> Changing the clients to start on port 443 works, but I want to have the 
>> redirs work, too.
>>
>
> Again, varies by client.  wininet is picking up that the scheme is HTTPS,  
> but it doesn't seem to change ports to reflect that.
>
>

Okay, had to be explicit about the port in InternetConnect(), and also set 
the SECURE flag in the HttpOpenRequest() call.

 
/dps


-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to