[Gambas-user] Issue 380 in gambas: RpcClient sends invalid HTTP requests (and RpcServer stops working)

gambas at ...2524... gambas at ...2524...
Thu Jan 10 18:39:15 CET 2013


Comment #5 on issue 380 by uAle... at ...626...: RpcClient sends invalid HTTP  
requests (and RpcServer stops working)
http://code.google.com/p/gambas/issues/detail?id=380

@Benoit:

I found the reason why it isn't working. The RpcClient is sending the HTTP  
request in 2 IP packets and the RpcServer can't handle this.

If we look in gambas3-client.eth" you can see in TCP/IP packet 6:
-------------------------------------------------------
POST / HTTP/1.1
User-Agent: Gambas/3.4 (gb.net.curl; Linux)
Host: localhost:9009
Accept: */*
Content-Type: text/xml
Content-Length: 113

The rest of the data is in TCP/IP packet 8:
-----------------------------------
<?xml version="1.0" encoding="UTF-8"?>
<methodCall><methodName>globalvar.get</methodName> <params /></methodCall>

I did a strace on my RpcServer, and you can notice it HANGS (cpu goes to  
100%) and the strace shows:
poll([{fd=16, events=POLLIN|POLLNVAL}], 1, 0) = 1 ([{fd=16,  
revents=POLLIN}])
recv(16, "P", 1, MSG_PEEK|MSG_NOSIGNAL) = 1
ioctl(16, FIONREAD, [144])              = 0
ioctl(16, FIONREAD, [144])              = 0
ioctl(16, FIONREAD, [144])              = 0
recv(16, "POST / HTTP/1.1\r\nUser-Agent: Gam"..., 144, MSG_NOSIGNAL) = 144

The 144 byte is EXACTLY the end of the first packet and start of the second  
packet.

ps. in gambas2 the RpcClient send the request in 1 TCP/IP packet





More information about the User mailing list