diff options
author | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2008-01-22 22:37:41 +0000 |
---|---|---|
committer | msweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be> | 2008-01-22 22:37:41 +0000 |
commit | 5bd77a735f888a051bcc81bbb241ddac9274b059 (patch) | |
tree | 3d589f86d660d0dfae3501c8be780e56173bdf9c /cgi-bin | |
parent | 91c84a3551145559de2956179661e111e373db95 (diff) |
Merge changes from CUPS 1.4svn-r7242.
git-svn-id: svn+ssh://src.apple.com/svn/cups/easysw/current@598 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cgi-bin')
-rw-r--r-- | cgi-bin/ipp-var.c | 5 | ||||
-rw-r--r-- | cgi-bin/jobs.c | 7 | ||||
-rw-r--r-- | cgi-bin/printers.c | 7 |
3 files changed, 17 insertions, 2 deletions
diff --git a/cgi-bin/ipp-var.c b/cgi-bin/ipp-var.c index 098d08630..8f8619127 100644 --- a/cgi-bin/ipp-var.c +++ b/cgi-bin/ipp-var.c @@ -595,6 +595,11 @@ cgiPrintTestPage(http_t *http, /* I - Connection to server */ snprintf(refresh, sizeof(refresh), "2;URL=%s", uri); cgiSetVariable("refresh_page", refresh); } + else if (cupsLastError() == IPP_NOT_AUTHORIZED) + { + puts("Status: 401\n"); + exit(0); + } cgiStartHTML(cgiText(_("Print Test Page"))); diff --git a/cgi-bin/jobs.c b/cgi-bin/jobs.c index 20a541727..41d58a038 100644 --- a/cgi-bin/jobs.c +++ b/cgi-bin/jobs.c @@ -3,7 +3,7 @@ * * Job status CGI for the Common UNIX Printing System (CUPS). * - * Copyright 2007 by Apple Inc. + * Copyright 2007-2008 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -185,6 +185,11 @@ do_job_op(http_t *http, /* I - HTTP connection */ cgiFormEncode(url + 6, getenv("HTTP_REFERER"), sizeof(url) - 6); cgiSetVariable("refresh_page", url); } + else if (cupsLastError() == IPP_NOT_AUTHORIZED) + { + puts("Status: 401\n"); + exit(0); + } cgiStartHTML(cgiText(_("Jobs"))); diff --git a/cgi-bin/printers.c b/cgi-bin/printers.c index 82e19a16f..0d817f75e 100644 --- a/cgi-bin/printers.c +++ b/cgi-bin/printers.c @@ -3,7 +3,7 @@ * * Printer status CGI for the Common UNIX Printing System (CUPS). * - * Copyright 2007 by Apple Inc. + * Copyright 2007-2008 by Apple Inc. * Copyright 1997-2006 by Easy Software Products. * * These coded instructions, statements, and computer programs are the @@ -280,6 +280,11 @@ print_command(http_t *http, /* I - Connection to server */ snprintf(refresh, sizeof(refresh), "2;URL=%s", uri); cgiSetVariable("refresh_page", refresh); } + else if (cupsLastError() == IPP_NOT_AUTHORIZED) + { + puts("Status: 401\n"); + exit(0); + } cgiStartHTML(cgiText(_("Printer Maintenance"))); |