[syslinux] Opinion wanted: metadata in HTTP requests

H. Peter Anvin hpa at zytor.com
Mon Apr 25 21:55:38 PDT 2011


On 04/25/2011 08:34 PM, Kevin Landreth wrote:
> On Mon, Apr 25, 2011 at 9:59 PM, H. Peter Anvin <hpa at zytor.com> wrote:
> 
>> I'm thinking it might be an interesting idea to pass ipappend-style
>> metadata (and quite possibly additional information, e.g. obtained from
>> DMI) when making a http request, but I'm not 100% sure about the best
>> way to do it.
>>
>> Would be great to filter/set what information to pass as an dhcp option
> (integer of course, like ipappend style is now).  Would make expanding some
> of the options below easier for initial HTTP config grabs. i.e. 1  would be
> serial, 2 would be cpu-serial, 3 would be serial and cpu serial, etc.

There would be a configuration file options, I wasn't planning on a DHCP
option although that is possible too, of course.

>> 4. using the http cookie protocol.
>>
>>   + easy.
>>   - somewhat high overhead (cumbersome encoding, data sent on every
>>    request).
>>
> You mean sessions or X-Headers ?  If you mean sessions I think that requires
> being HTTP/1.1 complaint; would require a bit of investigation.  X-Headers
> work all the time. I would personally prefer the X-Header sessions, but it
> is very similar to the query string approach.

I mean cookies, i.e. the Cookies: header.  The nice thing with them is
that most HTTP dynamic content generators know how to handle them out of
the box, i.e. the $_COOKIE array in PHP.

> I love this for an after the server loaded the configuration file, but if I
> can get some options via DHCP to determine the config, what's the point ?
> The only situation I can think of is when you don't have an inventory
> reclamation image to take inventory before launching into an installer.

I'm not 100% I follow there.

> FWIW, my preferred approach would be to set a list of options to set/filter
> out the meta-data in X-Headers for when I fetch my config file via HTTP
> (also set in dhcp options).  Right now I have a cludge that heavily relies
> on the mac address using substr() inside of the dhcp config.  Being able to
> connect DMI data to my inventory and provisioning systems would be stellar.

Yes, filtering is going to be implemented, but that doesn't really
resolve the protocol issue.

Right now I'm planning on using the Cookie: header, especially after
learning that there is an "old format" of the Cookie: header which cuts
down on the overhead of the request significantly.  At least PHP seems
to handle this old format just fine, although with more data it's
possible it becomes a problem.

	-hpa

-- 
H. Peter Anvin, Intel Open Source Technology Center
I work for Intel.  I don't speak on their behalf.




More information about the Syslinux mailing list