axis-c-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "gaolijun (JIRA)" <>
Subject [jira] Created: (AXISCPP-1037) Wrong use of the function substr
Date Fri, 17 Aug 2007 06:32:30 GMT
Wrong use of the function substr

                 Key: AXISCPP-1037
             Project: Axis-C++
          Issue Type: Bug
          Components: Transport (axis3)
    Affects Versions:  1.6 Beta
            Reporter: gaolijun

void HTTPTransport::processHTTPHeader()
// At this point the HTTP header has been found.  It now needs to be processed.
	int	iPosContentLength = m_strReceived.find( ASCII_S_CONTENT_LENGTH);
	if( iPosContentLength != std::string::npos)
		int	iEOL = m_strReceived.find( ASCII_S_LF, iPosContentLength);
		iPosContentLength += strlen( ASCII_S_CONTENT_LENGTH);
		m_iContentLength = atoi( m_strReceived.substr( iPosContentLength, iEOL).c_str());
//Below should be correct.second parameter is the length of the substr.
		m_iContentLength = atoi( m_strReceived.substr( iPosContentLength, iEOL - iPosContentLength).c_str());

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message