Changeset 64 in cheroxy


Ignore:
Timestamp:
04/11/13 18:31:04 (11 years ago)
Author:
cheese
Message:

#1 add response code handling on response code == 304 (not modified)

Location:
trunk/src
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/CRXHttpResponse.cpp

    r54 r64  
    126126
    127127    /*----------------------------------------------------------------
    128      * 2. check content size when is NOT chunked-encoding
    129      *----------------------------------------------------------------*/
    130     if (!mIsChunked && mContent.size () >= mContentLength)
    131         return 0;
    132 
    133     /*----------------------------------------------------------------
    134      * 3. resize memory and copy
     128     * 2. resize memory and copy
    135129     *----------------------------------------------------------------*/
    136130    aSize = mContent.size ();
    137131    mContent.resize (aSize + aLength);
     132
    138133    memcpy (&mContent[0] + aSize, aContent, aLength);
    139134
    140135    /*----------------------------------------------------------------
    141      * 4.
     136     * 3. push data
    142137     *----------------------------------------------------------------*/
    143138    aResult = mContent.size ();
     
    156151        }
    157152    }
     153
     154    /*----------------------------------------------------------------
     155     * 4. check content size when is NOT chunked-encoding
     156     *----------------------------------------------------------------*/
     157    if (!mIsChunked && mContent.size () >= mContentLength)
     158        return 0;
    158159    /*----------------------------------------------------------------*/
    159160
  • trunk/src/CRXProxy.cpp

    r61 r64  
    175175                mHttpResponse.SetHeader (aHttpHeader.c_str ());
    176176                aRemainHeader = false;
     177
     178                if (mHttpResponse.GetStatusCode () == 304)  break;
    177179            }
    178180        }
Note: See TracChangeset for help on using the changeset viewer.