Request from "localhost" using invalid Host: field "[localhost:631]"
Vladimir
lomov.vl at gmail.com
Sun May 3 04:01:21 PDT 2009
Hello.
The topic title taken from error_log.
I'm playing with SVN version of CUPS-1.4 (rev8589) and any attempt to go to http://localhost:631 fails with message "400 Incorrect Request" (in Russian locale: "400 ÐевеÑнÑй запÑоÑ"). I try several variants: http://127.0.0.1:631 , http://[::1]:631 and nothing. In error_log the same string is appeared.
OK, that's funny but I want my printer to work :-). I downloaded CUPS-1.4b2, compiled and installed it and it worked with the same configuration! I googled around a bit and find some mention about IPv6 introduced in 1.3.10.
Before that I used CUPS 1.3.x (I don't remember that 'x' was but definitely less than 10) and all works well.
Information about my system:
DISTRO: Slamd64-current
KERNEL: 2.6.28 ( self-configured and compiled, CONFIG_IPV6=y)
GCC: 4.3.3
/etc.hosts has lines:
127.0.0.1 localhost
::1 localhost
192.168.1.41 MYHOST
/etc/cups/cupsd.conf:
#
# "$Id: cupsd.conf.in 8188 2008-12-11 18:24:57Z mike $"
#
# Sample configuration file for the Common UNIX Printing System (CUPS)
# scheduler. See "man cupsd.conf" for a complete description of this
# file.
#
# Log general information in error_log - change "warn" to "debug"
# for troubleshooting...
LogLevel debug
# Administrator user group...
SystemGroup sys root
# Only listen for connections from the local machine.
#Listen localhost:631
#Listen /var/run/cups/cups.sock
#Listen *:631
Port 631
# Show shared printers on the local network.
Browsing On
BrowseOrder allow,deny
BrowseAllow all
BrowseAddress @LOCAL
BrowseLocalProtocols CUPS
BrowseProtocols all
DefaultShared Yes
# Default authentication type, when authentication is required...
DefaultAuthType Basic
# Restrict access to the server...
<Location />
Order allow,deny
Allow @LOCAL
</Location>
# Restrict access to the admin pages...
<Location /admin>
Encryption Required
Order allow,deny
Allow @LOCAL
</Location>
# Restrict access to configuration files...
<Location /admin/conf>
AuthType Default
Require user @SYSTEM
Order allow,deny
</Location>
# Set the default printer/job policies...
<Policy default>
# Job-related operations must be done by the owner or an administrator...
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default CUPS-Get-Devices>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
Order deny,allow
</Limit>
</Policy>
# Set the authenticated printer/job policies...
<Policy authenticated>
# Job-related operations must be done by the owner or an administrator...
<Limit Create-Job Print-Job Print-URI>
AuthType Default
Order deny,allow
</Limit>
<Limit Send-Document Send-URI Hold-Job Release-Job Restart-Job Purge-Jobs Set-Job-Attributes Create-Job-Subscription Renew-Subscription Cancel-Subscription Get-Notifications Reprocess-Job Cancel-Current-Job Suspend-Current-Job Resume-Job CUPS-Move-Job CUPS-Get-Document>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
# All administration operations require an administrator to authenticate...
<Limit CUPS-Add-Modify-Printer CUPS-Delete-Printer CUPS-Add-Modify-Class CUPS-Delete-Class CUPS-Set-Default>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# All printer operations require a printer operator to authenticate...
<Limit Pause-Printer Resume-Printer Enable-Printer Disable-Printer Pause-Printer-After-Current-Job Hold-New-Jobs Release-Held-New-Jobs Deactivate-Printer Activate-Printer Restart-Printer Shutdown-Printer Startup-Printer Promote-Job Schedule-Job-After CUPS-Accept-Jobs CUPS-Reject-Jobs>
AuthType Default
Require user @SYSTEM
Order deny,allow
</Limit>
# Only the owner or an administrator can cancel or authenticate a job...
<Limit Cancel-Job CUPS-Authenticate-Job>
AuthType Default
Require user @OWNER @SYSTEM
Order deny,allow
</Limit>
<Limit All>
AuthType Default
Order deny,allow
</Limit>
</Policy>
#
# End of "$Id: cupsd.conf.in 8188 2008-12-11 18:24:57Z mike $".
#
Part of /var/log/cups/error_log:
D [03/May/2009:20:00:00 +0900] cupsdAcceptClient: 11 from localhost:631 (IPv6)
D [03/May/2009:20:00:00 +0900] Report: clients=1
D [03/May/2009:20:00:00 +0900] Report: jobs=123
D [03/May/2009:20:00:00 +0900] Report: jobs-active=0
D [03/May/2009:20:00:00 +0900] Report: printers=0
D [03/May/2009:20:00:00 +0900] Report: printers-implicit=0
D [03/May/2009:20:00:00 +0900] Report: stringpool-string-count=366
D [03/May/2009:20:00:00 +0900] Report: stringpool-alloc-bytes=3872
D [03/May/2009:20:00:00 +0900] Report: stringpool-total-bytes=5832
D [03/May/2009:20:00:00 +0900] cupsdReadClient: 11 GET / HTTP/1.1
D [03/May/2009:20:00:00 +0900] cupsdSetBusyState: Active clients
D [03/May/2009:20:00:00 +0900] cupsdAuthorize: No authentication data provided.
E [03/May/2009:20:00:00 +0900] Request from "localhost" using invalid Host: field "[localhost:631]"
D [03/May/2009:20:00:00 +0900] cupsdReadClient: 11 Closing because Keep-Alive disabled
D [03/May/2009:20:00:00 +0900] cupsdCloseClient: 11
D [03/May/2009:20:00:00 +0900] cupsdSetBusyState: Not busy
D [03/May/2009:20:00:00 +0900] cupsdAcceptClient: 11 from localhost:631 (IPv6)
D [03/May/2009:20:00:00 +0900] cupsdReadClient: 11 GET /cups.css HTTP/1.1
D [03/May/2009:20:00:00 +0900] cupsdSetBusyState: Active clients
D [03/May/2009:20:00:00 +0900] cupsdAuthorize: No authentication data provided.
E [03/May/2009:20:00:00 +0900] Request from "localhost" using invalid Host: field "[localhost:631]"
D [03/May/2009:20:00:00 +0900] cupsdReadClient: 11 Closing because Keep-Alive disabled
D [03/May/2009:20:00:00 +0900] cupsdCloseClient: 11
D [03/May/2009:20:00:00 +0900] cupsdSetBusyState: Not busy
D [03/May/2009:20:00:00 +0900] cupsdAcceptClient: 11 from localhost:631 (IPv6)
D [03/May/2009:20:00:00 +0900] cupsdReadClient: 11 GET /favicon.ico HTTP/1.1
D [03/May/2009:20:00:00 +0900] cupsdSetBusyState: Active clients
D [03/May/2009:20:00:00 +0900] cupsdAuthorize: No authentication data provided.
E [03/May/2009:20:00:00 +0900] Request from "localhost" using invalid Host: field "[localhost:631]"
D [03/May/2009:20:00:00 +0900] cupsdReadClient: 11 Closing because Keep-Alive disabled
D [03/May/2009:20:00:00 +0900] cupsdCloseClient: 11
D [03/May/2009:20:00:00 +0900] cupsdSetBusyState: Not busy
Thanks in advance.
More information about the cups-devel
mailing list