Malformed HTTP request line for POST method

818 views
Skip to first unread message

timothy....@gmail.com

unread,
Oct 29, 2015, 1:26:47 PM10/29/15
to Siege Users
Running with siege 3.1.2, I am seeing a POST header that includes POST and the data again inside the header.  This is leading to me getting a malformed request error.

Following the debugging method you used here (https://groups.google.com/forum/#!searchin/siege-users/post/siege-users/1arxPlHBskI/7YGWSmHfFNAJ), the following shows what is causing the error.

[vagrant@localhost ~]$ siege -V

SIEGE 3.1.2


Copyright (C) 2015 by Jeffrey Fulmer, et al.

This is free software; see the source for copying conditions.

There is NO warranty; not even for MERCHANTABILITY or FITNESS

FOR A PARTICULAR PURPOSE.


[vagrant@localhost ~]$ siege -g "http://www.joedog.org/echo.php POST" -H 'Content-Type: application/json'                                                                                                  

POST /echo.php POST HTTP/1.0

Host: www.joedog.org

Accept: */*

User-Agent: Mozilla/5.0 (unknown-x86_64-linux-gnu) Siege/3.1.2

Content-Type: application/json

Connection: close

Content-type: application/x-www-form-urlencoded                                                                                                                                                    [0/3342]

Content-length: 0




HTTP/1.1 301 Moved Permanently

Date: Thu, 29 Oct 2015 17:15:25 GMT

Content-Type: text/html; charset=iso-8859-1

Connection: close

Set-Cookie: __cfduid=da675625f441b9a9663e8d7e402c01d711446138925; expires=Fri, 28-Oct-16 17:15:25 GMT; path=/; domain=.joedog.org; HttpOnly

Location: https://www.joedog.org/echo.php

Server: cloudflare-nginx

CF-RAY: 23d085bbcbfd0d0d-ATL


<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML 2.0//EN">

<html><head>

<title>301 Moved Permanently</title>

</head><body>

<h1>Moved Permanently</h1>

<p>The document has moved <a href="https://www.joedog.org/echo.php">here</a>.</p>

</body></html>


GET /echo.php HTTP/1.0

Host: www.joedog.org

Cookie: __cfduid=da675625f441b9a9663e8d7e402c01d711446138925

Accept: */*

User-Agent: Mozilla/5.0 (unknown-x86_64-linux-gnu) Siege/3.1.2

Content-Type: application/json

Connection: close



HTTP/1.1 200 OK

Server: cloudflare-nginx

Date: Thu, 29 Oct 2015 17:15:25 GMT

Content-Type: text/html; charset=UTF-8

Connection: close

X-Powered-By: PHP/5.4.16

CF-RAY: 23d085bd583737da-ATL


Host: www.joedog.org <br/>

Connection: Keep-Alive <br/>

Accept-Encoding: gzip <br/>

CF-IPCountry: US <br/>

X-Forwarded-For: 38.88.11.131 <br/>

CF-RAY: 23d085bd583737da-ATL <br/>

X-Forwarded-Proto: https <br/>

CF-Visitor: {"scheme":"https"} <br/>

Cookie: __cfduid=da675625f441b9a9663e8d7e402c01d711446138925 <br/>

Accept: */* <br/>

User-Agent: Mozilla/5.0 (unknown-x86_64-linux-gnu) Siege/3.1.2 <br/>

Content-Type: application/json <br/>

CF-Connecting-IP: 38.88.11.131 <br/>


[vagrant@localhost ~]$ siege -g "http://www.joedog.org/echo.php POST {"test": 5}" -H 'Content-Type: application/json'                                                                                      

POST /echo.php POST {test: 5} HTTP/1.0

Host: www.joedog.org

Accept: */*

User-Agent: Mozilla/5.0 (unknown-x86_64-linux-gnu) Siege/3.1.2

Content-Type: application/json

Connection: close

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

Content-length: 9


{test: 5}


<< LONG CONTENT REMOVED >>


Falling back to version 2.78 fixes it


[vagrant@localhost siege-2.78]$ siege -g "http://www.joedog.org/echo.php POST {"test": 5}" -H 'Content-Type: application/json'

POST /echo.php HTTP/1.1

Host: www.joedog.org

Accept: */*

Accept-Encoding: 

User-Agent: JoeDog/1.00 [en] (X11; I; Siege 2.78)

Content-Type: application/json

Connection: close

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

Content-length: 9


{test: 5}


<< LONG CONTENT REMOVED >>


Thanks for the great tool and please let me know if I can get any more information.





Reply all
Reply to author
Forward
0 new messages