Commit 8bc4ed47 authored by Wandenberg Peixoto's avatar Wandenberg Peixoto

fix bug on formatting chunk for 32 bit architectures, bug reported for sujitkumardora

parent 08bc57be
......@@ -202,7 +202,7 @@ ngx_http_push_stream_msg_t *ngx_http_push_stream_convert_char_to_msg_on_shared_l
static ngx_table_elt_t * ngx_http_push_stream_add_response_header(ngx_http_request_t *r, const ngx_str_t *header_name, const ngx_str_t *header_value);
static ngx_int_t ngx_http_push_stream_send_only_header_response(ngx_http_request_t *r, ngx_int_t status, const ngx_str_t *explain_error_message);
static u_char * ngx_http_push_stream_str_replace(u_char *org, u_char *find, u_char *replace, ngx_uint_t offset, ngx_pool_t *temp_pool);
static ngx_str_t * ngx_http_push_stream_get_formatted_chunk(const u_char *text, uint len, ngx_pool_t *temp_pool);
static ngx_str_t * ngx_http_push_stream_get_formatted_chunk(const u_char *text, off_t len, ngx_pool_t *temp_pool);
static ngx_str_t * ngx_http_push_stream_get_formatted_message(ngx_http_request_t *r, ngx_http_push_stream_channel_t *channel, ngx_http_push_stream_msg_t *msg, ngx_pool_t *temp_pool);
static ngx_str_t * ngx_http_push_stream_format_message(ngx_http_push_stream_channel_t *channel, ngx_http_push_stream_msg_t *message, ngx_str_t message_template, ngx_pool_t *temp_pool);
static ngx_int_t ngx_http_push_stream_send_response_content_header(ngx_http_request_t *r, ngx_http_push_stream_loc_conf_t *pslcf);
......
......@@ -86,7 +86,7 @@ ngx_http_push_stream_convert_char_to_msg_on_shared_locked(u_char *data, size_t l
msg->buf->last = ngx_copy(msg->buf->start, data, len);
msg->buf->pos = msg->buf->start;
msg->buf->end = msg->buf->last + len;
msg->buf->end = msg->buf->last;
msg->buf->temporary = 1;
msg->buf->memory = 1;
msg->deleted = 0;
......@@ -736,9 +736,9 @@ ngx_http_push_stream_get_formatted_hostname(ngx_pool_t *pool)
static ngx_str_t *
ngx_http_push_stream_get_formatted_chunk(const u_char *text, uint len, ngx_pool_t *temp_pool)
ngx_http_push_stream_get_formatted_chunk(const u_char *text, off_t len, ngx_pool_t *temp_pool)
{
ngx_str_t *chunk;
ngx_str_t *chunk;
u_int max_len;
/* the "0000000000000000" is 64-bit hexadimal string */
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment