[ipxe-devel] HTTP POST with chain always GET's

Michael Brown mcb30 at ipxe.org
Thu Jun 5 14:42:01 UTC 2014


On 05/06/14 13:49, Kristian Van Der Vliet wrote:
> I was hoping to use the HTTP POST & params support in the latest
> versions of iPXE to perform a simple POST to a custom application, which
> would allow me to capture various bits of information (like the MAC &
> System Serial). However it seems that no matter what I do, the HTTP
> request is always performed as a GET.

I am unable to reproduce this problem.  I see an HTTP POST show up in 
wireshark.

> iPXE performs the HTTP request, and even seems to recognise that I've
> got ##params at the end of the URL. The other end of the HTTP request is
> a custom Sinatra application with:
>
> get "/ipxe/:uuid/discover" do
>    puts "iPXE GET"
>    halt(404)
> end
>
> post "/ipxe/:uuid/discover" do
>    puts "iPXE POST"
>    halt(404)
> end
>
> I've confirmed that only the GET handler is ever called.

Could you try using wireshark to observe what actually goes over the 
wire?  I suspect the problem may be on your server side.

> Also is there a cleaner method to perform a "pure" HTTP POST that isn't
> in some way abusing the chain or img* commands?

No; you have to use the img* commands.  (Otherwise, where is the 
potential output from the POST supposed to go?)

Michael



More information about the ipxe-devel mailing list