cancel
Showing results for 
Search instead for 
Did you mean: 

NULL bytes in HTTP request - inbound from vendor to Pi/XI

Former Member
0 Kudos

Please help on the following error

this happens when we test a inbound call from vendor using HTTP.. When we test with the HTTP test client, it works fine.

      • ERROR => NULL bytes in HTTP request [http_plg_mt.c 5814].

In the ICM, we can the detail los as follows

***********************************************************************************

            • SECURITY LOG STARTED ******

***********************************************************************************

***********************************************************************************

            • SECURITY WARNING ******

***********************************************************************************

Wed Aug 18 12:07:52 2010

Error: Protocol error (-21), NULL bytes in HTTP request [http_plg_mt.c 5814]

[Thr 5144] CONNECTION (id=72/3999):

used: 1, type: default, role: Server(1), stateful: 0

NI_HDL: 715, protocol: HTTP(1)

local host: 10.50.xx.xx:50000 ()

remote host: 12.6.xxx.xxx:29693 ()

status: READ_REQUEST

connect time: 18.08.2010 12:07:52

MPI request: <12a7> MPI response: <12a8>

request_buf_size: 65464 response_buf_size: 0

request_buf_used: 77 response_buf_used: 0

request_buf_offset: 0 response_buf_offset: 0

***********************************************************************************

***********************************************************************************

            • SECURITY WARNING ******

***********************************************************************************

Wed Aug 18 12:51:55 2010

Error: Protocol error (-21), illegal request version [http_plg_mt.c 5417]

[Thr 9513] CONNECTION (id=30/4109):

used: 1, type: default, role: Server(1), stateful: 0

NI_HDL: 894, protocol: HTTP(1)

local host: 10.50.xx.xx:50000 ()

remote host: 12.6.xxx.xxx:29693 ()

status: READ_REQUEST

connect time: 18.08.2010 12:51:55

MPI request: <1377> MPI response: <1378>

request_buf_size: 65464 response_buf_size: 0

request_buf_used: 3600 response_buf_used: 0

request_buf_offset: 0 response_buf_offset: 0

Accepted Solutions (0)

Answers (1)

Answers (1)

Former Member
0 Kudos

Hello,

It looks like something is wrong with the HTTP request itself. "illegal request version" suggests something is wrong with the first line of the HTTP request. Perhaps the resource portion of the URL is not being properly escaped (i.e. contains a space)?

POST /resource HTTP/1.1

Set the ICM trace log level to "2" temporarily and share the additional data. If you have already tried this, you might need to use a tcp tunnel program to capture the HTTP traffic. Then compare your HTTP client request with the Vendor's HTTP request.

Thanks,

-Russ

Former Member
0 Kudos

I think you are talking about the Header HTTP request right..Here is the typical one.. as long as it is in the below format we should be ok , correct?

http://sap-ag.com:8088/sap/xi/adapter_plain?service=sender&namespace=urn%3Asap-ag%2Ecom&interface=%2...

would that be an issue because of Body of the message - UTF version or null body values or special chars?

Thanks

Gopal

Former Member
0 Kudos

Hi Gopal,

Since it's working with your test client I think getting the trace level in the ICM increased temporarily is your best bet. You should see the entire HTTP post in the log. Something which starts like this:

[Thr 08] ea9d8788 000000 504f5354 202f7361 702f7869 2f616461 POST /sap/xi/ada [Thr 08] ea9d8798 000016 70746572 5f706c61 696e3f73 65727669 pter_plain?servi [Thr 08] ea9d87a8 000032 63653d63 6f6d5f68 705f7465 73745f73 ce=com_test_sv

It could be something else, but I tried sending in an invalid HTTP header line and received this error message:

[Thr 08] *** ERROR => illegal request version [http_plg_mt.c 5428]

Thanks,

-Russ

Former Member
0 Kudos

Interesting! Here is the header and body values.. can we use the encoding =iso-8859-1 or should we use only UTF-8??

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">

<html>

<head>

<title>XML Post </title>

</head>

<body>

<FORM name=login method="POST" action="http://xmltest.XXXX.com:50000/sap/xi/adapter_plain?namespace=http://XXX.com&interface=siXXX&service=XXXXX">

<input type="hidden" name="loginRequest" value="<?xml version =&1.0&; encoding = &iso-8859-1&;?>

<OrderResponse>test</OrderResponse>

"><b></b>

<input type="submit" name="OK">

</form>

</body>

</html>

Thanks

Gopal

Former Member
0 Kudos

Is this the test client you are using? I'm pretty sure the code you sent will still post your data as form data:

Content-Type: application/x-www-form-urlencoded

Meaning you will be posting something like this into PI:

loginRequest=%3C%3Fxmlversion%3D%271.0%27encoding%3D%27iso-8859-1%27%3F%3E%3COrderResponse%3Etest%3C%2FOrderResponse%3E&OK=SubmitQuery

Is this what you are expecting?

Former Member
0 Kudos

Nope.. this is from the supplier.. not from the test client..

thanks-Gopal

Former Member
0 Kudos

Hi Gopal,

I think part of the issue is with the way the vendor is trying to POST the message. If you want messages to be posted directly from a browser I think you will need to use some client side scripting. This will enable XML to be in the body of the http post.

http://www.w3schools.com/dom/dom_http.asp

The examples are using HTTP GET, but you can search for examples where HTTP POST is used.

Thanks,

-Russ