Re: [web2py] Re: limiting the SSL max fragment size on development server (Rocket)

2017-10-31 Thread icodk
Thanks mcm for your suggestion.
I added this line in rocket.py
self.socket.settimeout(SOCKET_TIMEOUT)
self.socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 4096)
self.shutdown = self.socket.shutdown
 

starting around line 133 but I keep getting the same error on my IoT 
platform, which I thing is related to this fragment buffer size.
So bottom line I have no idea if this works. Thanks for your time. 



On Tuesday, October 31, 2017 at 6:38:36 PM UTC+1, mcm wrote:
>
> I think this is not exposed at python level
> you may try to hack the size on the lower level on the socket object using 
> the setsocktopt function) ... untested ;-)
>
> socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 4096)
>
>
>
> 2017-10-25 20:42 GMT+02:00 Dave S :
>
>>
>>
>> On Wednesday, October 25, 2017 at 6:18:08 AM UTC-7, icodk wrote:
>>>
>>> Some small IoT units can't  afford the standard 16K fragment size 
>>> required by default for SSl negotiation.
>>> On some servers it is possible to set such limit, ex 
>>> nginx: ssl_buffer_size 4k;
>>>
>>> Is it possible to do the same on web2py development server ? 
>>>
>>
>> A quick look at rocket.py doesn't make it obvious how to do it.  I don't 
>> know if the ssl.wrap_socket() call has optional parameters for this; if it 
>> does, it's not obvious [to me] in the Python docs at 17.3.
>>
>> /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 web2py+un...@googlegroups.com .
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [web2py] Re: limiting the SSL max fragment size on development server (Rocket)

2017-10-31 Thread Michele Comitini
I think this is not exposed at python level
you may try to hack the size on the lower level on the socket object using
the setsocktopt function) ... untested ;-)

socket.setsockopt(socket.SOL_SOCKET, socket.SO_SNDBUF, 4096)



2017-10-25 20:42 GMT+02:00 Dave S :

>
>
> On Wednesday, October 25, 2017 at 6:18:08 AM UTC-7, icodk wrote:
>>
>> Some small IoT units can't  afford the standard 16K fragment size
>> required by default for SSl negotiation.
>> On some servers it is possible to set such limit, ex
>> nginx: ssl_buffer_size 4k;
>>
>> Is it possible to do the same on web2py development server ?
>>
>
> A quick look at rocket.py doesn't make it obvious how to do it.  I don't
> know if the ssl.wrap_socket() call has optional parameters for this; if it
> does, it's not obvious [to me] in the Python docs at 17.3.
>
> /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 web2py+unsubscr...@googlegroups.com.
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[web2py] Re: limiting the SSL max fragment size on development server (Rocket)

2017-10-25 Thread Dave S


On Wednesday, October 25, 2017 at 6:18:08 AM UTC-7, icodk wrote:
>
> Some small IoT units can't  afford the standard 16K fragment size required 
> by default for SSl negotiation.
> On some servers it is possible to set such limit, ex 
> nginx: ssl_buffer_size 4k;
>
> Is it possible to do the same on web2py development server ? 
>

A quick look at rocket.py doesn't make it obvious how to do it.  I don't 
know if the ssl.wrap_socket() call has optional parameters for this; if it 
does, it's not obvious [to me] in the Python docs at 17.3.

/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 web2py+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.