An Apple AirPrint Internet Printing Protocol (IPP) client (from either iOS or 
Mac OS) can send requests over IPv6 with an IPvFuture format (RFC 3986) IPv6 
address in the Hostname HTTP Host Header value.  The Hostname is of the form 
[v1:<ipv6 addr>+en0].   Where en0 is the interface of the requesting Mac.

The Apache HTTP server is rejecting the request (with "400 Bad Request") due to 
this Hostname value in the header before a registered IPP Apache module even 
sees it.

Is it possible to write a hook or filter that would prevent Apache from 
rejecting this request and allowing this Hostname Host Header value to pass 
thru, or does the Apache base source code need to change for this?

The following is what is seen in the Apache log file:

[Fri Aug 02 11:36:06 2013] [error] [client fe80::12dd:b1ff:fed6:d654] Client 
sent malformed Host header
[Fri Aug 02 11:36:06 2013] [error] [client 2620:0:290:e012:12dd:b1ff:fed6:d654] 
Client sent malformed Host header

and the Apache code that is logging this error appears to be fix_hostname() in 
./server/vhost.c


Thanks,
Chris

Reply via email to