[syslinux] Opinion wanted: metadata in HTTP requests (updated)

Andrew Bobulsky rulerof at gmail.com
Tue Apr 26 07:25:25 PDT 2011


Hello hpa, Kevin,

While I don't know very much about the specifics of what syslinux or
gPXE/iPXE might frown upon in terms of "overhead," wherever it may be, I'd
like to toss in a second mention for HTTP cookies.  

As a little bit of background, I'm not an expert with PHP by any means, but
I do find it to be quite suitable for config and boot menu generation and I
indeed picked it up expressly for that purpose.  The one thing that gets
particularly cumbersome as boot scripts grow larger and projects take on
more files is managing the laundry list of variables added to the GET with
every new action I implement.  It's something that isn't quite as
unmanageable as it seems to be when starting to work with that type of
environment, but making decisions about whether or not to use only the
variables you *need* or whether you should just grab absolutely everything,
every single time, takes some getting used to.

Some time ago, when I decided to play around with jQuery, my coworker blew
my mind when he showed me how to use cookies with PHP on a simple web form
that hooked into my deployment and provisioning database.  Having been doing
everything with the HTTP GET route for such a long time made it difficult
for me to understand, from a webserver-script-writing point of view, how PHP
could just "know" which client it was talking to.  Even though I knew /how/
cookies worked, I never considered actually using them because up to that
point, all of my web scripting experience had been in the context of
bootloaders that simply didn't support them ;-)

Suffice it to say, if I had been using cookies from the start, I feel that I
probably would have had a much easier time acclimating to the HTTP
server/client scripting environment :)

Just my two cents, of course!

Cheers,
Andrew Bobulsky

-----Original Message-----
From: syslinux-bounces at zytor.com [mailto:syslinux-bounces at zytor.com] On
Behalf Of Kevin Landreth
Sent: Tuesday, April 26, 2011 9:29 AM
To: For discussion of Syslinux and tftp-hpa
Subject: Re: [syslinux] Opinion wanted: metadata in HTTP requests (updated)

On Tue, Apr 26, 2011 at 12:50 AM, H. Peter Anvin <hpa at zytor.com> wrote:

> Okay, I have narrowed it down to two options:
>
> 1. Using HTTP cookies, in every request.  To avoid collision with other
>   cookie uses, the cookie names would be prefixed with _Syslinux_ or
>   some similar prefix although this adds overhead.
>
>
I would prefer this option as it offers the greatest interoperability
between applications and doesn't interfere with the URI any.  Just casting
my vote.

2. Using a GET query string, if and only if the http URL is of a
>   special form, probably:
>
>   http://example.com/something??
>
>   ... i.e. ending in a double ?? which should not normally happen in a
>   URL.
>

I can see this getting harry in the future around cgi based config
generators.  How would it handle a
http://example.com/controller.php?pxelinux=1  type of scenario.  Would It be
specified as http://example.com/controller.php??pxelinux=1 and then properly
replaced with http://example.com/controller.php?pxelinux=1&serial=12345  ?

--
Kevin Landreth
_______________________________________________
Syslinux mailing list
Submissions to Syslinux at zytor.com
Unsubscribe or set options at:
http://www.zytor.com/mailman/listinfo/syslinux
Please do not send private replies to mailing list traffic.





More information about the Syslinux mailing list