/*
* 'httpClearCookie()' - Clear the cookie value(s).
*
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
*/
void
/*
* 'httpFlushWrite()' - Flush data in write buffer.
*
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
*/
int /* O - Bytes written or -1 on error */
* string to use with httpSetField() for the HTTP_FIELD_AUTHORIZATION
* value.
*
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
*/
char * /* O - Authorization string */
/*
* 'httpGetBlocking()' - Get the blocking/non-block state of a connection.
*
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
*/
int /* O - 1 if blocking, 0 if non-blocking */
/*
* 'httpGetCookie()' - Get any cookie data from the response.
*
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
*/
const char * /* O - Cookie data or NULL */
/*
* 'httpGetFd()' - Get the file descriptor associated with a connection.
*
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
*/
int /* O - File descriptor or -1 if none */
* This function returns the complete content length, even for
* content larger than 2^31 - 1.
*
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
*/
off_t /* O - Content length */
/*
* 'httpGetStatus()' - Get the status of the last HTTP request.
*
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
*/
http_status_t /* O - HTTP status */
/*
* 'httpGetSubField2()' - Get a sub-field value.
*
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
*/
char * /* O - Value or NULL */
* it is the best we can do (on others, this seed isn't even used...)
*/
-#ifdef WIN32
-#else
+# ifdef WIN32
+# else
gettimeofday(&curtime, NULL);
srand(curtime.tv_sec + curtime.tv_usec);
-#endif /* WIN32 */
+# endif /* WIN32 */
for (i = 0; i < sizeof(data); i ++)
- data[i] = rand(); /* Yes, this is a poor source of random data... */
+ data[i] = rand();
- RAND_seed(&data, sizeof(data));
+ RAND_seed(data, sizeof(data));
#endif /* HAVE_LIBSSL */
}
/*
* 'httpRead2()' - Read data from a HTTP connection.
*
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
*/
ssize_t /* O - Number of bytes read */
bytes = (ssize_t)recv(http->fd, buffer, (int)length, 0);
#else
while ((bytes = recv(http->fd, buffer, length, 0)) < 0)
- if (errno != EINTR)
+ if (errno != EINTR && errno != EAGAIN)
break;
#endif /* WIN32 */
#ifdef WIN32
http->error = WSAGetLastError();
#else
- if (errno == EINTR)
+ if (errno == EINTR || errno == EAGAIN)
bytes = 0;
else
http->error = errno;
* HTTP_FIELD_AUTHORIZATION prior to issuing a HTTP request using httpGet(),
* httpHead(), httpOptions(), httpPost, or httpPut().
*
- * @since CUPS 1.3@
+ * @since CUPS 1.3/Mac OS X 10.5@
*/
void
/*
* 'httpSetCookie()' - Set the cookie value(s)...
*
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
*/
void
*
* Currently only HTTP_CONTINUE is supported for the "expect" argument.
*
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
*/
void
/*
* 'httpSetLength()' - Set the content-length and content-encoding.
*
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
*/
void
/*
* 'httpWait()' - Wait for data available on a connection.
*
- * @since CUPS 1.1.19@
+ * @since CUPS 1.1.19/Mac OS X 10.3@
*/
int /* O - 1 if data is available, 0 otherwise */
/*
* 'httpWrite2()' - Write data to a HTTP connection.
*
- * @since CUPS 1.2@
+ * @since CUPS 1.2/Mac OS X 10.5@
*/
ssize_t /* O - Number of bytes written */