/*
- * "$Id: client.c,v 1.91.2.1 2001/04/02 19:51:47 mike Exp $"
+ * "$Id: client.c,v 1.91.2.2 2001/05/13 18:38:34 mike Exp $"
*
* Client routines for the Common UNIX Printing System (CUPS) scheduler.
*
}
}
- if ((strcasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Upgrade") == 0 ||
- (best != NULL && best->encryption == HTTP_ENCRYPT_ALWAYS)) &&
+ if (strcasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Upgrade") == 0 &&
con->http.tls == NULL)
{
#ifdef HAVE_LIBSSL
}
httpPrintf(HTTP(con), "Connection: Upgrade\r\n");
- httpPrintf(HTTP(con), "Upgrade: TLS/1.0,SSL/2.0,SSL/3.0\r\n");
+ httpPrintf(HTTP(con), "Upgrade: TLS/1.0,HTTP/1.1\r\n");
httpPrintf(HTTP(con), "Content-Length: 0\r\n");
httpPrintf(HTTP(con), "\r\n");
}
else
{
- if ((status = IsAuthorized(con)) == HTTP_UPGRADE_REQUIRED)
+ if (strcasecmp(con->http.fields[HTTP_FIELD_CONNECTION], "Upgrade") == 0 &&
+ con->http.tls == NULL)
{
#ifdef HAVE_LIBSSL
/*
}
httpPrintf(HTTP(con), "Connection: Upgrade\r\n");
- httpPrintf(HTTP(con), "Upgrade: TLS/1.0,SSL/2.0,SSL/3.0\r\n");
+ httpPrintf(HTTP(con), "Upgrade: TLS/1.0,HTTP/1.1\r\n");
httpPrintf(HTTP(con), "Content-Length: 0\r\n");
httpPrintf(HTTP(con), "\r\n");
}
#endif /* HAVE_LIBSSL */
}
- else if (status != HTTP_OK)
+
+ if ((status = IsAuthorized(con)) != HTTP_OK)
{
SendError(con, status);
CloseClient(con);
close(fd);
- LogMessage(L_DEBUG, "SendCommand() %d command=\"%s\" file=%d pipe_pid=%d",
- con->http.fd, command, con->file, con->pipe_pid);
+ LogMessage(L_INFO, "Started \"%s\" (pid=%d)", command, con->pipe_pid);
+
+ LogMessage(L_DEBUG, "SendCommand() %d file=%d", con->http.fd, con->file);
if (con->pipe_pid == 0)
return (0);
#ifdef HAVE_LIBSSL
if (code == HTTP_UPGRADE_REQUIRED)
- {
if (httpPrintf(HTTP(con), "Connection: Upgrade\r\n") < 0)
return (0);
- if (httpPrintf(HTTP(con), "Upgrade: TLS/1.0,SSL/2.0,SSL/3.0\r\n") < 0)
- return (0);
- }
+ if (httpPrintf(HTTP(con), "Upgrade: TLS/1.0,HTTP/1.1\r\n") < 0)
+ return (0);
#endif /* HAVE_LIBSSL */
if (con->http.version >= HTTP_1_1 && !con->http.keep_alive)
/*
- * End of "$Id: client.c,v 1.91.2.1 2001/04/02 19:51:47 mike Exp $".
+ * End of "$Id: client.c,v 1.91.2.2 2001/05/13 18:38:34 mike Exp $".
*/