You are viewing a plain text version of this content. The canonical link for it is here.
Posted to cvs@httpd.apache.org by tr...@apache.org on 2003/04/16 00:47:59 UTC
cvs commit: httpd-2.0/modules/http http_core.c http_protocol.c
trawick 2003/04/15 15:47:59
Modified: server protocol.c
modules/http http_core.c http_protocol.c
Log:
fix some discrepancies between format strings and arguments,
resolving some warnings on 64-bit systems
Revision Changes Path
1.131 +3 -3 httpd-2.0/server/protocol.c
Index: protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/server/protocol.c,v
retrieving revision 1.130
retrieving revision 1.131
diff -u -r1.130 -r1.131
--- protocol.c 29 Mar 2003 16:32:22 -0000 1.130
+++ protocol.c 15 Apr 2003 22:47:57 -0000 1.131
@@ -1100,9 +1100,9 @@
apr_table_setn(r->err_headers_out,
(PROXYREQ_PROXY == r->proxyreq) ? "Proxy-Authenticate"
: "WWW-Authenticate",
- /* need APR_TIME_T_FMT_HEX */
- apr_psprintf(r->pool, "Digest realm=\"%s\", nonce=\"%llx\"",
- ap_auth_name(r), r->request_time));
+ apr_psprintf(r->pool, "Digest realm=\"%s\", nonce=\""
+ "%" APR_UINT64_T_HEX_FMT "\"",
+ ap_auth_name(r), (apr_uint64_t)r->request_time));
}
AP_DECLARE(int) ap_get_basic_auth_pw(request_rec *r, const char **pw)
1.310 +1 -2 httpd-2.0/modules/http/http_core.c
Index: http_core.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_core.c,v
retrieving revision 1.309
retrieving revision 1.310
diff -u -r1.309 -r1.310
--- http_core.c 3 Feb 2003 17:53:03 -0000 1.309
+++ http_core.c 15 Apr 2003 22:47:58 -0000 1.310
@@ -211,9 +211,8 @@
* Insert the chunk header, specifying the number of bytes in
* the chunk.
*/
- /* XXX might be nice to have APR_OFF_T_FMT_HEX */
hdr_len = apr_snprintf(chunk_hdr, sizeof(chunk_hdr),
- "%qx" CRLF, (apr_uint64_t)bytes);
+ "%" APR_UINT64_T_HEX_FMT CRLF, (apr_uint64_t)bytes);
ap_xlate_proto_to_ascii(chunk_hdr, hdr_len);
e = apr_bucket_transient_create(chunk_hdr, hdr_len,
c->bucket_alloc);
1.467 +2 -3 httpd-2.0/modules/http/http_protocol.c
Index: http_protocol.c
===================================================================
RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
retrieving revision 1.466
retrieving revision 1.467
diff -u -r1.466 -r1.467
--- http_protocol.c 15 Apr 2003 17:39:43 -0000 1.466
+++ http_protocol.c 15 Apr 2003 22:47:58 -0000 1.467
@@ -2907,9 +2907,8 @@
if (ctx->num_ranges > 1) {
/* Is ap_make_content_type required here? */
const char *orig_ct = ap_make_content_type(r, r->content_type);
- /* need APR_TIME_T_FMT_HEX */
- ctx->boundary = apr_psprintf(r->pool, "%qx%lx",
- r->request_time, (long) getpid());
+ ctx->boundary = apr_psprintf(r->pool, "%" APR_UINT64_T_HEX_FMT "%lx",
+ (apr_uint64_t)r->request_time, (long) getpid());
ap_set_content_type(r, apr_pstrcat(r->pool, "multipart",
use_range_x(r) ? "/x-" : "/",
Re: cvs commit: httpd-2.0/modules/http http_core.c http_protocol.c
Posted by Graham Leggett <mi...@sharp.fm>.
Jeff Trawick wrote:
> http://cvs.apache.org/viewcvs.cgi/httpd-2.0 is your friend. You don't
> need me to check to see if you lost my change.
Oops... forgot about that one...
Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm "There's a moon
over Bourbon Street
tonight..."
Re: cvs commit: httpd-2.0/modules/http http_core.c http_protocol.c
Posted by Graham Leggett <mi...@sharp.fm>.
Jeff Trawick wrote:
> http://cvs.apache.org/viewcvs.cgi/httpd-2.0 is your friend. You don't
> need me to check to see if you lost my change.
Oops... forgot about that one...
Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm "There's a moon
over Bourbon Street
tonight..."
Re: cvs commit: httpd-2.0/modules/http http_core.c http_protocol.c
Posted by Jeff Trawick <tr...@attglobal.net>.
Graham Leggett wrote:
> trawick@apache.org wrote:
>
>> Index: http_protocol.c
>> ===================================================================
>> RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
>> retrieving revision 1.466
>> retrieving revision 1.467
>> diff -u -r1.466 -r1.467
>> --- http_protocol.c 15 Apr 2003 17:39:43 -0000 1.466
>> +++ http_protocol.c 15 Apr 2003 22:47:58 -0000 1.467
>> @@ -2907,9 +2907,8 @@
>> if (ctx->num_ranges > 1) {
>> /* Is ap_make_content_type required here? */
>> const char *orig_ct = ap_make_content_type(r,
>> r->content_type);
>> - /* need APR_TIME_T_FMT_HEX */
>> - ctx->boundary = apr_psprintf(r->pool, "%qx%lx",
>> - r->request_time, (long)
>> getpid());
>> + ctx->boundary = apr_psprintf(r->pool, "%"
>> APR_UINT64_T_HEX_FMT "%lx",
>> +
>> (apr_uint64_t)r->request_time, (long) getpid());
>> ap_set_content_type(r, apr_pstrcat(r->pool,
>> "multipart",
>> use_range_x(r) ?
>> "/x-" : "/",
>>
>
>
> Please check this is still applied, it may have been reverted when I
> reverted the date fix (I cannot find the original commit email in my
> inbox to be sure).
http://cvs.apache.org/viewcvs.cgi/httpd-2.0 is your friend. You don't
need me to check to see if you lost my change.
Re: cvs commit: httpd-2.0/modules/http http_core.c http_protocol.c
Posted by Jeff Trawick <tr...@attglobal.net>.
Graham Leggett wrote:
> trawick@apache.org wrote:
>
>> Index: http_protocol.c
>> ===================================================================
>> RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
>> retrieving revision 1.466
>> retrieving revision 1.467
>> diff -u -r1.466 -r1.467
>> --- http_protocol.c 15 Apr 2003 17:39:43 -0000 1.466
>> +++ http_protocol.c 15 Apr 2003 22:47:58 -0000 1.467
>> @@ -2907,9 +2907,8 @@
>> if (ctx->num_ranges > 1) {
>> /* Is ap_make_content_type required here? */
>> const char *orig_ct = ap_make_content_type(r,
>> r->content_type);
>> - /* need APR_TIME_T_FMT_HEX */
>> - ctx->boundary = apr_psprintf(r->pool, "%qx%lx",
>> - r->request_time, (long)
>> getpid());
>> + ctx->boundary = apr_psprintf(r->pool, "%"
>> APR_UINT64_T_HEX_FMT "%lx",
>> +
>> (apr_uint64_t)r->request_time, (long) getpid());
>> ap_set_content_type(r, apr_pstrcat(r->pool,
>> "multipart",
>> use_range_x(r) ?
>> "/x-" : "/",
>>
>
>
> Please check this is still applied, it may have been reverted when I
> reverted the date fix (I cannot find the original commit email in my
> inbox to be sure).
http://cvs.apache.org/viewcvs.cgi/httpd-2.0 is your friend. You don't
need me to check to see if you lost my change.
Re: cvs commit: httpd-2.0/modules/http http_core.c http_protocol.c
Posted by Graham Leggett <mi...@sharp.fm>.
trawick@apache.org wrote:
> Index: http_protocol.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
> retrieving revision 1.466
> retrieving revision 1.467
> diff -u -r1.466 -r1.467
> --- http_protocol.c 15 Apr 2003 17:39:43 -0000 1.466
> +++ http_protocol.c 15 Apr 2003 22:47:58 -0000 1.467
> @@ -2907,9 +2907,8 @@
> if (ctx->num_ranges > 1) {
> /* Is ap_make_content_type required here? */
> const char *orig_ct = ap_make_content_type(r, r->content_type);
> - /* need APR_TIME_T_FMT_HEX */
> - ctx->boundary = apr_psprintf(r->pool, "%qx%lx",
> - r->request_time, (long) getpid());
> + ctx->boundary = apr_psprintf(r->pool, "%" APR_UINT64_T_HEX_FMT "%lx",
> + (apr_uint64_t)r->request_time, (long) getpid());
>
> ap_set_content_type(r, apr_pstrcat(r->pool, "multipart",
> use_range_x(r) ? "/x-" : "/",
>
>
>
Please check this is still applied, it may have been reverted when I
reverted the date fix (I cannot find the original commit email in my
inbox to be sure).
Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm "There's a moon
over Bourbon Street
tonight..."
Re: cvs commit: httpd-2.0/modules/http http_core.c http_protocol.c
Posted by Graham Leggett <mi...@sharp.fm>.
trawick@apache.org wrote:
> Index: http_protocol.c
> ===================================================================
> RCS file: /home/cvs/httpd-2.0/modules/http/http_protocol.c,v
> retrieving revision 1.466
> retrieving revision 1.467
> diff -u -r1.466 -r1.467
> --- http_protocol.c 15 Apr 2003 17:39:43 -0000 1.466
> +++ http_protocol.c 15 Apr 2003 22:47:58 -0000 1.467
> @@ -2907,9 +2907,8 @@
> if (ctx->num_ranges > 1) {
> /* Is ap_make_content_type required here? */
> const char *orig_ct = ap_make_content_type(r, r->content_type);
> - /* need APR_TIME_T_FMT_HEX */
> - ctx->boundary = apr_psprintf(r->pool, "%qx%lx",
> - r->request_time, (long) getpid());
> + ctx->boundary = apr_psprintf(r->pool, "%" APR_UINT64_T_HEX_FMT "%lx",
> + (apr_uint64_t)r->request_time, (long) getpid());
>
> ap_set_content_type(r, apr_pstrcat(r->pool, "multipart",
> use_range_x(r) ? "/x-" : "/",
>
>
>
Please check this is still applied, it may have been reverted when I
reverted the date fix (I cannot find the original commit email in my
inbox to be sure).
Regards,
Graham
--
-----------------------------------------
minfrin@sharp.fm "There's a moon
over Bourbon Street
tonight..."