]> git.ipfire.org Git - thirdparty/cups.git/commitdiff
Reduced the number of fields that are supported/used to reduce memory
authormike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 9 Jul 1999 13:08:38 +0000 (13:08 +0000)
committermike <mike@7a7537e8-13f0-0310-91df-b6672ffda945>
Fri, 9 Jul 1999 13:08:38 +0000 (13:08 +0000)
requirements.

Added "socket" to the list of recognized methods.

git-svn-id: svn+ssh://src.apple.com/svn/cups/cups.org/trunk@509 7a7537e8-13f0-0310-91df-b6672ffda945

cups/http.c
cups/http.h

index 6997770f110ec124e704c41218ec866825843fec..de03012b1cc617720a57414f36a8880cc9777f9e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http.c,v 1.37 1999/06/18 18:36:08 mike Exp $"
+ * "$Id: http.c,v 1.38 1999/07/09 13:08:37 mike Exp $"
  *
  *   HTTP routines for the Common UNIX Printing System (CUPS) scheduler.
  *
@@ -99,18 +99,10 @@ static int          http_send(http_t *http, http_state_t request, char *uri);
 
 static char            *http_fields[] =
                        {
-                         "Accept",
-                         "Accept-Charset",
-                         "Accept-Encoding",
                          "Accept-Language",
                          "Accept-Ranges",
-                         "Age",
-                         "Allow",
-                         "Alternates",
                          "Authorization",
-                         "Cache-Control",
                          "Connection",
-                         "Content-Base",
                          "Content-Encoding",
                          "Content-Language",
                          "Content-Length",
@@ -120,38 +112,19 @@ static char               *http_fields[] =
                          "Content-Type",
                          "Content-Version",
                          "Date",
-                         "Derived-From",
-                         "Etag",
-                         "Expires",
-                         "From",
                          "Host",
-                         "If-Match",
                          "If-Modified-Since",
-                         "If-None-Match",
-                         "If-Range",
                          "If-Unmodified-since",
                          "Keep-Alive",
                          "Last-Modified",
                          "Link",
                          "Location",
-                         "Max-Forwards",
-                         "Message-Id",
-                         "MIME-Version",
-                         "Pragma",
-                         "Proxy-Authenticate",
-                         "Proxy-Authorization",
-                         "Public",
                          "Range",
                          "Referer",
                          "Retry-After",
-                         "Server",
                          "Transfer-Encoding",
                          "Upgrade",
-                         "URI",
                          "User-Agent",
-                         "Vary",
-                         "Via",
-                         "Warning",
                          "WWW-Authenticate"
                        };
 static char            *days[7] =
@@ -500,6 +473,8 @@ httpSeparate(char *uri,             /* I - Universal Resource Identifier */
       *port = 443;
     else if (strcasecmp(method, "ipp") == 0)   /* Not registered yet... */
       *port = ippPort();
+    else if (strcasecmp(method, "socket") == 0)        /* Not registered yet... */
+      *port = 9100;
     else
       *port = 0;
   }
@@ -1395,5 +1370,5 @@ http_send(http_t       *http,     /* I - HTTP data */
 
 
 /*
- * End of "$Id: http.c,v 1.37 1999/06/18 18:36:08 mike Exp $".
+ * End of "$Id: http.c,v 1.38 1999/07/09 13:08:37 mike Exp $".
  */
index b98dc7aa2d5a37e749f00c1c692e2a5224ed7000..c2b849b718fa81b97a914d7a2ef95ffb83e8c503 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * "$Id: http.h,v 1.19 1999/06/18 18:36:09 mike Exp $"
+ * "$Id: http.h,v 1.20 1999/07/09 13:08:38 mike Exp $"
  *
  *   Hyper-Text Transport Protocol definitions for the Common UNIX Printing
  *   System (CUPS).
@@ -63,7 +63,7 @@ extern "C" {
 
 #  define HTTP_MAX_URI         1024    /* Max length of URI string */
 #  define HTTP_MAX_HOST                256     /* Max length of hostname string */
-#  define HTTP_MAX_BUFFER      8192    /* Max length of data buffer */
+#  define HTTP_MAX_BUFFER      2048    /* Max length of data buffer */
 #  define HTTP_MAX_VALUE       256     /* Max header field value length */
 
 
@@ -182,18 +182,10 @@ typedef enum
 typedef enum
 {
   HTTP_FIELD_UNKNOWN = -1,
-  HTTP_FIELD_ACCEPT = 0,
-  HTTP_FIELD_ACCEPT_CHARSET,
-  HTTP_FIELD_ACCEPT_ENCODING,
   HTTP_FIELD_ACCEPT_LANGUAGE,
   HTTP_FIELD_ACCEPT_RANGES,
-  HTTP_FIELD_AGE,
-  HTTP_FIELD_ALLOW,
-  HTTP_FIELD_ALTERNATES,
   HTTP_FIELD_AUTHORIZATION,
-  HTTP_FIELD_CACHE_CONTROL,
   HTTP_FIELD_CONNECTION,
-  HTTP_FIELD_CONTENT_BASE,
   HTTP_FIELD_CONTENT_ENCODING,
   HTTP_FIELD_CONTENT_LANGUAGE,
   HTTP_FIELD_CONTENT_LENGTH,
@@ -203,38 +195,19 @@ typedef enum
   HTTP_FIELD_CONTENT_TYPE,
   HTTP_FIELD_CONTENT_VERSION,
   HTTP_FIELD_DATE,
-  HTTP_FIELD_DERIVED_FROM,
-  HTTP_FIELD_ETAG,
-  HTTP_FIELD_EXPIRES,
-  HTTP_FIELD_FROM,
   HTTP_FIELD_HOST,
-  HTTP_FIELD_IF_MATCH,
   HTTP_FIELD_IF_MODIFIED_SINCE,
-  HTTP_FIELD_IF_NONE_MATCH,
-  HTTP_FIELD_IF_RANGE,
   HTTP_FIELD_IF_UNMODIFIED_SINCE,
   HTTP_FIELD_KEEP_ALIVE,
   HTTP_FIELD_LAST_MODIFIED,
   HTTP_FIELD_LINK,
   HTTP_FIELD_LOCATION,
-  HTTP_FIELD_MAX_FORWARDS,
-  HTTP_FIELD_MESSAGE_ID,
-  HTTP_FIELD_MIME_VERSION,
-  HTTP_FIELD_PRAGMA,
-  HTTP_FIELD_PROXY_AUTHENTICATE,
-  HTTP_FIELD_PROXY_AUTHORIZATION,
-  HTTP_FIELD_PUBLIC,
   HTTP_FIELD_RANGE,
   HTTP_FIELD_REFERER,
   HTTP_FIELD_RETRY_AFTER,
-  HTTP_FIELD_SERVER,
   HTTP_FIELD_TRANSFER_ENCODING,
   HTTP_FIELD_UPGRADE,
-  HTTP_FIELD_URI,
   HTTP_FIELD_USER_AGENT,
-  HTTP_FIELD_VARY,
-  HTTP_FIELD_VIA,
-  HTTP_FIELD_WARNING,
   HTTP_FIELD_WWW_AUTHENTICATE,
   HTTP_FIELD_MAX
 } http_field_t;
@@ -313,5 +286,5 @@ extern int          httpGetLength(http_t *http);
 #endif /* !_CUPS_HTTP_H_ */
 
 /*
- * End of "$Id: http.h,v 1.19 1999/06/18 18:36:09 mike Exp $".
+ * End of "$Id: http.h,v 1.20 1999/07/09 13:08:38 mike Exp $".
  */