summaryrefslogtreecommitdiff
path: root/cups/http.c
diff options
context:
space:
mode:
authormsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2013-10-09 22:44:03 +0000
committermsweet <msweet@a1ca3aef-8c08-0410-bb20-df032aa958be>2013-10-09 22:44:03 +0000
commitd21dc0ed72eb008021f91e1a01f22dcf3da4a95e (patch)
tree8c387bb2f26613444c8a34f894db3fcd8636e262 /cups/http.c
parent48bd1142c9f9b61816e64e76e4671c69208487ce (diff)
downloadcups-d21dc0ed72eb008021f91e1a01f22dcf3da4a95e.tar.gz
Save work on cupsd - almost there...
git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@11326 a1ca3aef-8c08-0410-bb20-df032aa958be
Diffstat (limited to 'cups/http.c')
-rw-r--r--cups/http.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/cups/http.c b/cups/http.c
index bacf8c7ad..f3e449b7a 100644
--- a/cups/http.c
+++ b/cups/http.c
@@ -1274,6 +1274,19 @@ httpGetLength2(http_t *http) /* I - HTTP connection */
/*
+ * 'httpGetPending()' - Get the number of bytes that are buffered for writing.
+ *
+ * @since CUPS 2.0@
+ */
+
+size_t /* O - Number of bytes buffered */
+httpGetPending(http_t *http) /* I - HTTP connection */
+{
+ return (http ? http->wused : 0);
+}
+
+
+/*
* 'httpGetReady()' - Get the number of bytes that can be read without blocking.
*
* @since CUPS 2.0@
@@ -2574,6 +2587,7 @@ httpReadRequest(http_t *http, /* I - HTTP connection */
if (!*req_uri)
{
DEBUG_puts("1httpReadRequest: No request URI.");
+ _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("No request URI."), 1);
return (HTTP_STATE_ERROR);
}
@@ -2590,6 +2604,7 @@ httpReadRequest(http_t *http, /* I - HTTP connection */
if (!*req_version)
{
DEBUG_puts("1httpReadRequest: No request protocol version.");
+ _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("No request protocol version."), 1);
return (HTTP_STATE_ERROR);
}
@@ -2621,6 +2636,7 @@ httpReadRequest(http_t *http, /* I - HTTP connection */
else
{
DEBUG_printf(("1httpReadRequest: Unknown method \"%s\".", req_method));
+ _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Unknown request method."), 1);
return (HTTP_STATE_UNKNOWN_METHOD);
}
@@ -2640,6 +2656,7 @@ httpReadRequest(http_t *http, /* I - HTTP connection */
else
{
DEBUG_printf(("1httpReadRequest: Unknown version \"%s\".", req_version));
+ _cupsSetError(IPP_STATUS_ERROR_INTERNAL, _("Unknown request version."), 1);
return (HTTP_STATE_UNKNOWN_VERSION);
}