Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Epiphany and IE do not handle multipart content properly (Add Printer, etc.) #3455

Closed
michaelrsweet opened this issue Dec 17, 2009 · 11 comments
Labels
Milestone

Comments

@michaelrsweet
Copy link
Collaborator

@michaelrsweet michaelrsweet commented Dec 17, 2009

Version: 1.4.2
CUPS.org User: ajacoutot

Hi.

The web interface gets stuck when on the 'Add Printer' page.
The "Looking for printers..." icon not stops rotating and only one "Other Network Printers:" is found.

When I reload the page, then another network printer is found but the first one disappears... I can keep refreshing the page and at one point USB will appear as a choice... but whatever I try, I never get all the options at once on the page and the icon never stops. Once I make the desired backend appear (e.g. lpd), I can keep going and install the printer just fine.

I really have no idea how to get more info about this.
Debug error_log attached, devices seem to be found, they only don't appear on the web interface.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jan 14, 2010

CUPS.org User: mike

What browser are you using?

Can you attach a copy of the following:

  1. "lpstat -v" output.
  2. HTML source of the final page.
@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jan 15, 2010

CUPS.org User: ajacoutot

$ pstat -v
device for epson: lpd://lpd.bsdfrog.org
device for Virtual_PDF_Printer: cups-pdf:/

It seems to work ok with Firefox3 (a bit slow, to display all printers protocols, but it works). However, with epiphany (webkit), it hangs forever, html source attached.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jan 18, 2010

CUPS.org User: mike

OK, it looks like epiphany is not handling multipart content properly. I will see about blacklisting multipart for it, assuming it identifies itself differently than Safari...

The speed issue is likely addressed by the changes in the upcoming 1.4.3 - we just show the selection page twice - once for the "looking for printers banner" and then again when we have collected all of the device URIs.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jan 18, 2010

CUPS.org User: ajacoutot

This is the complete identification Epiphany gives me:
Mozilla/5.0 (X11; U; OpenBSD i386; c) AppleWebKit/531.2+ (KHTML, like Gecko) Safari/531.2+

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Feb 13, 2010

CUPS.org User: fm

Same error happens in chrome. I am using version 5.0.322.2.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Apr 1, 2010

CUPS.org User: ajacoutot

1.4.3 still has the issue but now the interface is completely stuck on "Looking for printers...". Whether I stop or refresh the page load, nothing happens.
I can repeat the issue on webkit-based browser (epiphany, chromium...) where on firefox or seamonkey it works fine.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Apr 21, 2010

CUPS.org User: cboston

Even though the code specifically whitelists multipart for MSIE user agents, neither IE 7 nor IE 8 seem to be able to handle it in my testing. It just sits there at the "Looking for Printers" screen. You end up having to scroll down to a second "page" after a multipart/x-mixed-replace header to choose a backend.

Some searching seems to indicate that IE has never supported x-mixed-replace.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Apr 28, 2010

CUPS.org User: jgrumboe

Yes, this is exactly what I posted in the dup-bug #3456.
And i posted an URL (http://xodian.net/serendipity/index.php?/archives/13-Dynamic-Content-in-both-Firefox-and-IE.html) which could be a possibly solution to be implemented.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Nov 26, 2010

CUPS.org User: imcguire

I can confirm that this is still a problem in version 1.4.5 with IE8.

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jan 8, 2011

CUPS.org User: mike

Fixed in Subversion repository.

(uncle)

@michaelrsweet

This comment has been minimized.

Copy link
Collaborator Author

@michaelrsweet michaelrsweet commented Jan 8, 2011

"str3455.patch":

Index: cgi-bin/html.c

--- cgi-bin/html.c (revision 9428)
+++ cgi-bin/html.c (working copy)
@@ -1,9 +1,9 @@
/*

  • "$Id$"
    *
    • * HTML support functions for the Common UNIX Printing System (CUPS).
    • * HTML support functions for CUPS.
      *
    • * Copyright 2007-2009 by Apple Inc.
    • * Copyright 2007-2011 by Apple Inc.
  • Copyright 1997-2006 by Easy Software Products.
  • These coded instructions, statements, and computer programs are the
    @@ -208,31 +208,13 @@
    int /* O - 1 if multi-part supported, 0 otherwise */
    cgiSupportsMultipart(void)
    {
  • const char user_agent; / User-Agent string */
  • static int supports_multipart = -1;/* Cached value */
  • /*
  • * Too many bug reports for browsers that don't support it, and too much pain
  • * to whitelist known-good browsers, so for now we just punt on multi-part
  • * support... :(
  • */

  • if (supports_multipart < 0)
  • {
  • /*
  • * CUPS STR #3049: Apparently some browsers don't support multi-part
  • * documents, which makes them useless for many web sites. Rather than
  • * abandoning those users, we'll offer a degraded single-part mode...
  • * Currently we know that anything based on Gecko, MSIE, and Safari all
  • * work. We'll add more as they are reported/tested.

- */

  • if ((user_agent = getenv("HTTP_USER_AGENT")) != NULL &&
  •    (strstr(user_agent, " Gecko/") != NULL ||
    
  • strstr(user_agent, " MSIE ") != NULL ||
  • strstr(user_agent, " Safari/") != NULL))
  •  supports_multipart = 1;
    
  • else
  •  supports_multipart = 0;
    

- }

  • return (supports_multipart);
  • return (0);
    }
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
1 participant
You can’t perform that action at this time.