Package fitnesse.http

Examples of fitnesse.http.SimpleResponse.addHeader()


      return new NotFoundResponder().makeResponse(context, request);
    PageData data = page.getData();
    saveAttributes(request, data);
    VersionInfo commitRecord = page.commit(data);
    if (commitRecord != null) {
      response.addHeader("Current-Version", commitRecord.getName());
    }
    context.recentChanges.updateRecentChanges(page);
    response.redirect(context.contextRoot, resource);

    return response;
View Full Code Here


  private Response saveEdits(FitNesseContext context, Request request, WikiPage page) {
    Response response = new SimpleResponse();
    setData();
    VersionInfo commitRecord = page.commit(data);
    if (commitRecord != null) {
      response.addHeader("Current-Version", commitRecord.getName());
    }
    context.recentChanges.updateRecentChanges(page);

    if (request.hasInput("redirect"))
      response.redirect("", request.getInput("redirect").toString());
View Full Code Here

public class UnauthorizedResponder implements Responder {
 
  public Response makeResponse(FitNesseContext context, Request request) {
    SimpleResponse response = new SimpleResponse(401);
    response.addHeader("WWW-Authenticate", "Basic realm=\"FitNesse\"");

    HtmlPage page = context.pageFactory.newPage();
    page.addTitles("401 Unauthorized");
    page.put("resource", request.getResource());
    page.setMainTemplate("unauthorized.vm");
View Full Code Here

      this.token = token;
    }

    public Response makeResponse(FitNesseContext context, Request request) {
      SimpleResponse response = new SimpleResponse(401);
      response.addHeader("WWW-Authenticate", token == null ? NEGOTIATE : NEGOTIATE + " " + token);
      HtmlPage html = context.pageFactory.newPage();
      html.addTitles("Negotiated authentication required");
      if (request == null)
        html.setMainTemplate("authRequired.vm");
      else
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.