py4web issue on get requests

37 views
Skip to first unread message

Edoardo Torrini

unread,
Feb 21, 2020, 11:38:08 PM2/21/20
to web2py-users
Good morning,

I am a software developer and I want to create a project client-server.
The client is wrote in c# with xamarine and the server on py4web.
The client create request with some parameters and the server reply with a data in json form.
I use celery for scheduling the request and I create a task for each type of requests.

When with the client application I create a request [like the example below], the function await.response.Content.ReadAsStringAsync create an exception: unexpected end of stream

Exception - Xamarine.png


Server side the situation is that I create for each request a DAL and I define a table where I took the date to send to the client.
in this way:
Controller - py4web.png

I invoke  the task that reply the json file to the client in this way:

task prd - py4web.png








































Someone know why the operation create this type of exception, I try using a request with chrome but the page was displayed correctly.
Thanks for the help.

Edoardo Torrini




Dave S

unread,
Feb 22, 2020, 2:30:16 AM2/22/20
to web2py-users


On Friday, February 21, 2020 at 8:38:08 PM UTC-8, Edoardo Torrini wrote:
Good morning,
task prd - py4web.png








































Someone know why the operation create this type of exception, I try using a request with chrome but the page was displayed correctly.
Thanks for the help.


I'm surprised that the "return" is inside the json.dumps().  I would expect it to be the other way around.

/dps
 

Christian Varas

unread,
Feb 22, 2020, 8:49:17 AM2/22/20
to web...@googlegroups.com
Hi Torrini, 

I don’t know what is causing the error but you can use a local proxy like burp suite to catch your client request and see what’s wrong with that request. If is malformed you can see with with this.

Cheers.

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/web2py/a25df1ac-50b3-4033-a661-374577da6281%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages