What's wrong with this HTTP POST request?

Posted by bigboy on Server Fault See other posts from Server Fault or by bigboy
Published on 2014-06-07T05:52:12Z Indexed on 2014/06/07 9:27 UTC
Read the original article Hit count: 423

Filed under:
|
|
|

I'm trying to fuzz a server using the Sulley fuzzing framework.

I observe the following stream in Wireshark. The error talks about a problem with JSON parsing, however, when I try the same HTTP POST request using Google Chrome's Postman extension, it succeeds.

Can anyone please explain what could be wrong about this HTTP POST request? The JSON seems valid.

POST /restconf/config HTTP/1.1
Host: 127.0.0.1:8080
Accept: */*
Content-Type: application/yang.data+json
{ "toaster:toaster" : { "toaster:toasterManufacturer" : "Geqq", "toaster:toasterModelNumber" : "asaxc", "toaster:toasterStatus" : "_." }}


HTTP/1.1 400 Bad Request
Server: Apache-Coyote/1.1
Content-Type: */*
Transfer-Encoding: chunked
Date: Sat, 07 Jun 2014 05:26:35 GMT
Connection: close

152
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<errors xmlns="urn:ietf:params:xml:ns:yang:ietf-restconf">
    <error>
        <error-type>protocol</error-type>
        <error-tag>malformed-message</error-tag>
        <error-message>Error parsing input: Root element of Json has to be Object</error-message>
    </error>
</errors>

0

© Server Fault or respective owner

Related posts about http

Related posts about http-headers