Good afternoon,

We are using Apache and PHP to form a CWMP server for TR69 provisioning of 
customer routers. We have two bits of kit we are looking to use, two ZyXEL 
routers with model numbers AMG1202 and NBG1202.

To cut a long story short, we are able to communicate happily with the AMG1202, 
but are running into a show-stopping issue with the NBG1202. After some 
tracing, it seems to come down to the way that they send empty POST messages to 
the server (this is done to denote to the server that they are awaiting a 
command).

The AMG sends:

POST /{URL} HTTP/1.1
Host: {Host}
User-Agent: Allegro-Software-WebClient/4.07
Accept: */*
Content-Type: text/xml; charset=utf-8
Content-Length: 0
Cookie: PHPSESSID=sj810he8epc5hlqsautj96j1u0\r\n
\r\n

Which works fine. The script executes and returns a response.
The NBG on the other hand, sends the following:

POST /{URL} HTTP/1.1
HOST: {Host}
User-Agent: workssys.com
Transfer-Encoding: chunked
Content-Length: 0
Cookie2: $Version="1"
Cookie: PHPSESSID=l47r1bf2erk870i8n3m9sm4v65\r\n
\r\n
0\r\n
\r\n

This hangs with no reply. In a wireshark trace, I see the TCP ACK of the 
message, but apache does not return anything. However, if I send the same code 
in telnet, it works fine!

I can replicate this if I send the following:

POST /{URL} HTTP/1.1
HOST: {Host}
User-Agent: workssys.com
Transfer-Encoding: chunked
Content-Length: 0
Cookie2: $Version="1"
Cookie: PHPSESSID=l47r1bf2erk870i8n3m9sm4v65\r\n
\r\n

However the wireshark trace shows that the full packet has been received. I'm 
relatively confident this is an issue with the ZyXEL NBG1202 and have logged a 
ticket with them, but was wondering if there was anything I could do in the 
meantime to get Apache to accept the request (it looks like it's waiting for 
more input, and so isn't executing the PHP script. I'm wondering if it is 
possible to set a timeout on the request, say 5 seconds or so?). It's worth 
noting that the original message to the server goes through fine (this is a 
POST message that is not empty).

Any help would be much appreciated! :)

Reply via email to