public String getLocalAddress() { return getSocket().getLocalAddress(); }
public boolean read() { return super.read(getSocket()); }
public int getLocalPort() { return getSocket().getLocalPort(); }
public void set(HTTPRequest httpReq) { set((HTTPPacket)httpReq); setSocket(httpReq.getSocket()); }
public boolean post(HTTPResponse httpRes) { HTTPSocket httpSock = getSocket(); long offset = 0; long length = httpRes.getContentLength(); if (hasContentRange() == true) { long firstPos = getContentRangeFirstPosition(); long lastPos = getContentRangeLastPosition(); // Thanks for Brent Hills (10/26/04) if (lastPos <= 0) lastPos = length - 1; if ((firstPos > length ) || (lastPos > length)) return returnResponse(HTTPStatus.INVALID_RANGE); httpRes.setContentRange(firstPos, lastPos, length); httpRes.setStatusCode(HTTPStatus.PARTIAL_CONTENT); offset = firstPos; length = lastPos - firstPos + 1; } return httpSock.post(httpRes, offset, length, isHeadRequest()); //httpSock.close(); }
public String getLocalAddress() { return getSocket().getLocalAddress(); }
public int getLocalPort() { return getSocket().getLocalPort(); }
public int getLocalPort() { return getSocket().getLocalPort(); }
public boolean read() { return super.read(getSocket()); }
public boolean read() { return super.read(getSocket()); }
public String getLocalAddress() { return getSocket().getLocalAddress(); }
public void set(HTTPRequest httpReq) { set((HTTPPacket)httpReq); setSocket(httpReq.getSocket()); }
public void set(HTTPRequest httpReq) { set((HTTPPacket)httpReq); setSocket(httpReq.getSocket()); }
public boolean post(HTTPResponse httpRes) { HTTPSocket httpSock = getSocket(); long offset = 0; long length = httpRes.getContentLength(); if (hasContentRange() == true) { long firstPos = getContentRangeFirstPosition(); long lastPos = getContentRangeLastPosition(); // Thanks for Brent Hills (10/26/04) if (lastPos <= 0) lastPos = length - 1; if ((firstPos > length ) || (lastPos > length)) return returnResponse(HTTPStatus.INVALID_RANGE); httpRes.setContentRange(firstPos, lastPos, length); httpRes.setStatusCode(HTTPStatus.PARTIAL_CONTENT); offset = firstPos; length = lastPos - firstPos + 1; } return httpSock.post(httpRes, offset, length, isHeadRequest()); //httpSock.close(); }
public boolean post(HTTPResponse httpRes) { HTTPSocket httpSock = getSocket(); long offset = 0; long length = httpRes.getContentLength(); if (hasContentRange() == true) { long firstPos = getContentRangeFirstPosition(); long lastPos = getContentRangeLastPosition(); // Thanks for Brent Hills (10/26/04) if (lastPos <= 0) lastPos = length - 1; if ((firstPos > length ) || (lastPos > length)) return returnResponse(HTTPStatus.INVALID_RANGE); httpRes.setContentRange(firstPos, lastPos, length); httpRes.setStatusCode(HTTPStatus.PARTIAL_CONTENT); offset = firstPos; length = lastPos - firstPos + 1; } return httpSock.post(httpRes, offset, length, isHeadRequest()); //httpSock.close(); }