* got a fatal error.
*/
public Reply get(Request request)
throws ProtocolException, ResourceException
{
HttpExtList extl = null;
HttpExtList reply_extl = null;
Reply reply = super.get(request);
//Mandatory End-to-End
extl = request.getHttpManExtDecl();
if (extl != null) {
reply_extl = new HttpExtList(extl);
reply.setHttpManExtDecl(reply_extl);
HttpExt exts[] = extl.getHttpExts();
HttpExt rexts[] = reply_extl.getHttpExts();
for (int i=0; i < exts.length; i++) {
HttpExt ext = exts[i];
Dictionary headers = request.getExtensionHeaders(ext);
Enumeration e = headers.keys();
String resp_header = "";
while (e.hasMoreElements()) {
String name = (String) e.nextElement();
HeaderValue value = (HeaderValue)headers.get(name);
resp_header+="["+name+": "+value.toExternalForm()+"] ";
}
reply.setExtensionHeader(rexts[i], "receipt", resp_header);
}
if (rexts.length > 0)
reply.setEnd2EndExtensionAcknowledgmentHeader();
}
//Mandatory Hop-by-Hop
extl = request.getHttpCManExtDecl();
if (extl != null) {
reply_extl = new HttpExtList(extl);
reply.setHttpCManExtDecl(reply_extl);
HttpExt exts[] = extl.getHttpExts();
HttpExt rexts[] = reply_extl.getHttpExts();
for (int i=0; i < exts.length; i++) {
HttpExt ext = exts[i];
Dictionary headers = request.getExtensionHeaders(ext);
Enumeration e = headers.keys();
String resp_header = "";
while (e.hasMoreElements()) {
String name = (String) e.nextElement();
HeaderValue value = (HeaderValue)headers.get(name);
resp_header+="["+name+": "+value.toExternalForm()+"] ";
}
reply.setExtensionHeader(rexts[i], "receipt", resp_header);
}
if (rexts.length > 0)
reply.setHopByHopExtensionAcknowledgmentHeader();
}
//Optionnal End-to-End
extl = request.getHttpOptExtDecl();
if (extl != null) {
reply_extl = new HttpExtList(extl);
reply.setHttpOptExtDecl(reply_extl);
HttpExt exts[] = extl.getHttpExts();
HttpExt rexts[] = reply_extl.getHttpExts();
for (int i=0; i < exts.length; i++) {
HttpExt ext = exts[i];
Dictionary headers = request.getExtensionHeaders(ext);
Enumeration e = headers.keys();
String resp_header = "";
while (e.hasMoreElements()) {
String name = (String) e.nextElement();
HeaderValue value = (HeaderValue)headers.get(name);
resp_header+="["+name+": "+value.toExternalForm()+"] ";
}
reply.setExtensionHeader(rexts[i], "receipt", resp_header);
}
}
//Optionnal Hop-by-Hop
extl = request.getHttpCOptExtDecl();
if (extl != null) {
reply_extl = new HttpExtList(extl);
reply.setHttpCOptExtDecl(reply_extl);
HttpExt exts[] = extl.getHttpExts();
HttpExt rexts[] = reply_extl.getHttpExts();
for (int i=0; i < exts.length; i++) {
HttpExt ext = exts[i];
Dictionary headers = request.getExtensionHeaders(ext);
Enumeration e = headers.keys();
String resp_header = "";