Add constness

This commit is contained in:
Ai Lin Chia
2016-12-02 16:30:18 +01:00
parent 46bee9d52c
commit ab998330cb

@ -2096,9 +2096,9 @@ TcpSocket *HttpServer::unzipReply(TcpSocket* s) {
// so we need to rewrite the Content-Length: and the
// Content-Encoding: http mime field values so they are no longer
// "gzip" and use the uncompressed content-length.
char *ptr1 = mime.getContentEncodingPos();
char *ptr2 = mime.getContentLengthPos();
char *ptr3 = NULL;
const char *ptr1 = mime.getContentEncodingPos();
const char *ptr2 = mime.getContentLengthPos();
const char *ptr3 = NULL;
// change the content type based on the extension before the
// .gz extension since we are uncompressing it
@ -2132,7 +2132,7 @@ TcpSocket *HttpServer::unzipReply(TcpSocket* s) {
subloop:
char *nextMin = (char *)-1;
const char *nextMin = (char *)-1;
if ( ptr1 && (ptr1 < nextMin || nextMin==(char *)-1)) nextMin = ptr1;
if ( ptr2 && (ptr2 < nextMin || nextMin==(char *)-1)) nextMin = ptr2;
if ( ptr3 && (ptr3 < nextMin || nextMin==(char *)-1)) nextMin = ptr3;