[cups.development] Re : Re: [cups.general] Facing error 'Requestfrom "localhost" using invalid Host : field"/private/var/run/cupsd"' after applying Mac security update2009-001 on Mac OS 10.5

Michael Sweet mike at easysw.com
Thu Feb 26 09:16:20 PST 2009


Mangesh Kute wrote:
>> On Feb 25, 2009, at 3:24 AM, Mangesh Kute wrote:
>>> Hi All,
>>>
>>> We provide print client "iPrint" on Mac using CUPS API, to work with
>>> Novell iPrint server.
>>> We connect to local CUPS server by giving host name as "/private/var/
>>> run/cupsd"(value returned by cupsServer()). After connecting
>>> successfully when we send any request on this connection, it returns
>>> an error "HTTP_BAD_REQUEST". In CUPS error log, we are seeing error
>>> 'Request from "localhost" using invalid Host : field "/private/var/
>>> run/cupsd"'
>>>
>>> Does anyone have any idea on the reason for error ?
>> Sure, you aren't passing in a valid hostname.  CUPS is now checking
>> for that.
>>
>> If you use the CUPS functions for sending IPP requests, the domain
>> socket filename
>> is automatically mapped to localhost when the request is sent.
>> Otherwise, you are
>> responsible for doing so since otherwise httpPost() uses the address
>> passed to
>> httpConnect().
> 
> We are using our function for sending ipp request.
> We tried with mapping hostname to localhost, if it is a socket
> filename. Now it is working fine.
> Thank you for your help.
> 
>> In general, there should be no reason not to use the CUPS-provided
>> cupsDo*Request
>> functions in any application.  If there is, we want to know about it!
>>
> 
> We are using our own function for avoiding some issues, because our
> client is not yet fully written to the latest CUPS version and we are
> still lagging.  We are planning to get it done soon.
> 
>>> We are seeing this error after applying "Mac Security Update
>>> 2009-001' on Mac OS10.5. But if we install Mac combo update 10.5.6,
>>> we are not seeing this error and communication goes fine with local
>>> cups server.
>>>
>>> Is "CUPS 1.3.8" provided on Mac OS X 10.5  customized for MAC and is
>>> it different from source code available at http://svn.easysw.com/public/cups/tags/release-1.3.8/
>>>   (I am not able to locate above error in this source code) ?  From
>>> where can I get source code for "CUPS 1.3.8" provided on Mac OS X
>>> 10.5 ?
>> The update contains some of the changes from later CUPS releases.
> 
> Is there any separate repository for code of CUPS distributed with Mac OS ?

The CUPS sources are included as part of the Darwin OS releases:

     http://developer.apple.com/opensource/

In general, we try to keep the cups.org and Darwin sources in sync,
however the release schedules sometimes don't match up.

-- 
______________________________________________________________________
Michael Sweet, Easy Software Products           mike at easysw dot com




More information about the cups-devel mailing list