Package org.parosproxy.paros.network

Examples of org.parosproxy.paros.network.HttpMessage


        }
    }
   
    private String getNewestVersionName() {
        String newVersionName = null;
        HttpMessage msg = null;
        String resBody = null;
       
        try {
            msg = new HttpMessage(new URI(SF_PAROS_FILES, true));
            getHttpSender().sendAndReceive(msg,true);
            if (msg.getResponseHeader().getStatusCode() != HttpStatusCode.OK) {
                throw new IOException();
            }
            resBody = msg.getResponseBody().toString();
            Matcher matcher = null;
            if (Constant.isWindows()) {
                matcher = patternNewestVersionWindows.matcher(resBody);
            } else {
                matcher = patternNewestVersionLinux.matcher(resBody);               
View Full Code Here


    }

    public HistoryReference(int historyId) throws HttpMalformedHeaderException, SQLException {
    RecordHistory history = null;   
    history = staticTableHistory.read(historyId);
    HttpMessage msg = history.getHttpMessage();
    build(history.getSessionId(), history.getHistoryId(), history.getHistoryType(), msg);

  }
View Full Code Here

        if (display != null) {
            return display;
        }
       
      HttpMessage msg = null;
      try {
          msg = getHttpMessage();
            display = getDisplay(msg);         
      } catch (HttpMalformedHeaderException e1) {
          display = "";
View Full Code Here

        return list.size();
    }
   
    public synchronized HttpMessage get(int i) {
       
        HttpMessage msg = null;
        try {
            msg = (HttpMessage) list.get(i);
        } catch (Exception e) {};
        return msg;
    }
View Full Code Here

       
        if (resultNode == null) {
            return null;
        }
       
        HttpMessage nodeMsg = null;
        try {
            nodeMsg = resultNode.getHistoryReference().getHttpMessage();
        } catch (Exception e) {
        }
        return nodeMsg;
View Full Code Here

     * This method will rely on reading message from the History table.
     * @param ref
     */
    public synchronized void addPath(HistoryReference ref) {

        HttpMessage msg = null;
        try {
            msg = ref.getHttpMessage();
        } catch (Exception e) {
            e.printStackTrace();
            return;
View Full Code Here

            sb.append(path[i].toString());
            if (i<path.length-1) {
                sb.append('/');
            }
        }
        HttpMessage newMsg = base.cloneRequest();
       
        URI uri = new URI(sb.toString(), true);
        newMsg.getRequestHeader().setURI(uri);
        newMsg.getRequestHeader().setMethod(HttpRequestHeader.GET);
        newMsg.getRequestBody().setBody("");
        newMsg.getRequestHeader().setContentLength(0);
       
    //HistoryReference historyRef = new HistoryReference(model.getSession(), baseRef.getHistoryType(), newMsg);
    HistoryReference historyRef = new HistoryReference(model.getSession(), HistoryReference.TYPE_TEMPORARY, newMsg);
   
        return historyRef;
View Full Code Here

  public void onHttpRequestSend(HttpMessage msg) {
//      if (msg.getRequestHeader().isImage()) {
//          return;
//      }
     
      HttpMessage existingMsg = model.getSession().getSiteTree().pollPath(msg);

      // check if a msg of the same type exist
      if (existingMsg != null && !existingMsg.getResponseHeader().isEmpty()) {
          if (HttpStatusCode.isSuccess(existingMsg.getResponseHeader().getStatusCode())) {
              // exist, no modification necessary
              return;
          }
      }
       
View Full Code Here

      treeSite.addTreeSelectionListener(new javax.swing.event.TreeSelectionListener() {

        public void valueChanged(javax.swing.event.TreeSelectionEvent e) {   

            HttpMessage msg = null;
            SiteNode node = (SiteNode) treeSite.getLastSelectedPathComponent();
            if (node == null)
                return;
            if (!node.isRoot()) {
                        try {
View Full Code Here

            }
        }

        // add history to site panel.  Must use event queue because this proxylistener may not be run from event queue.
        final HistoryReference ref = historyRef;
        final HttpMessage finalMsg = msg;
        if (EventQueue.isDispatchThread()) {
            model.getSession().getSiteTree().addPath(ref, msg);
            if (isFirstAccess) {
                isFirstAccess = false;
                view.getSiteTreePanel().expandRoot();
View Full Code Here

TOP

Related Classes of org.parosproxy.paros.network.HttpMessage

Copyright © 2018 www.massapicom. 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.