The order of the headers should not matter. There might be "weaker" implementations of HTTP standard where the ordering does matter, but it shouldn't in general.
Here's a link that describes HTTP headers:
http://www.w3.org/Protocols/rfc2616/rfc2616-sec4.html#sec4.2