hc-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Wilcox, Mark" <Mark.Wil...@webct.com>
Subject how to "continue" following a 100 status message with a PUT
Date Thu, 08 May 2003 22:00:14 GMT
Hi,
I'm doing a PUT (example code below) to a MS Exchange server (which speaks DAV). I'm not using
Slide because I can't seem to get it to NTLM authentication and I only need GET and PUT support
for now.
 
Anyway, when I do PUT, the server returns back with status code of 100 and message "Continue".
How exactly should I "continue" with the PUT? 
 
thanks,
 
Mark
 
 
------------
...
PutMethod put = new PutMethod(putURL);

Header contentHeader = new Header();

contentHeader.setName("Content-Type");

contentHeader.setValue("text/plain");

put.addRequestHeader(new Header("Translate","f"));

put.addRequestHeader(contentHeader);

put.setDoAuthentication(true);

FileInputStream in = null;

try {

//f is defined earlier.

in = new FileInputStream(f);

} catch (FileNotFoundException e) {

// TODO Auto-generated catch block

e.printStackTrace();

}

put.setRequestBody(in);

put.setRequestContentLength((int)f.length());

int status = -1;

try {

status = client.executeMethod(put);

} catch (HttpException e1) {

// TODO Auto-generated catch block

e1.printStackTrace();

} catch (IOException e1) {

// TODO Auto-generated catch block

e1.printStackTrace();

}

System.out.println("status is "+status);

System.out.println("status message is "+put.getStatusText());

 

Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message