code: public static String createPUTHeader(String path,
  					 String host,
  					 String user_agent,
  					 String type,
  					 long length,
  					 boolean append) {
  
  	StringBuffer head = new StringBuffer();
  
  	if (append) {
  	    head.append("POST ");
  	} else {
  	    head.append("PUT ");
  	}
  
  	head.append(path + " " + HTTP_VERSION + CRLF);
  
  	head.append(HOST + host + CRLF);
  	head.append(CONNECTION_CLOSE);
  	head.append(USER_AGENT + user_agent + CRLF);
  	head.append(CONTENT_TYPE + type + CRLF);
  
  	if (length == -1) {
  	    head.append(CHUNKING);
  	} else {
  	    head.append(CONTENT_LENGTH + length + CRLF);
  	}
  
  	head.append(CRLF);
  
  	return head.toString();
      }
docs: /* Used for GASS PUT