Esempio n. 1
0
 @Override
 public HttpPanelResponse getResponsePanel() {
   if (responsePanel == null) {
     // ZAP: constructor changed
     responsePanel = new HttpPanelResponse(false, OptionsParamView.BASE_VIEW_KEY + ".main.");
     // ZAP: Added 'left arrow' icon
     responsePanel.setIcon(new ImageIcon(View.class.getResource("/resource/icon/16/106.png")));
     responsePanel.setName(Constant.messages.getString("http.panel.response.title")); // ZAP: i18n
     responsePanel.setEnableViewSelect(false);
     responsePanel.loadConfig(Model.getSingleton().getOptionsParam().getConfig());
   }
   return responsePanel;
 }
Esempio n. 2
0
  private void displayMessage(SearchResult sr) {
    HttpMessage msg = sr.getMessage();
    if (msg.getRequestHeader().isEmpty()) {
      requestPanel.clearView(true);
    } else {
      requestPanel.setMessage(msg);
    }

    if (msg.getResponseHeader().isEmpty()) {
      responsePanel.clearView(false);
    } else {
      responsePanel.setMessage(msg, true);
    }
    highlightFirstResult(sr);
  }
Esempio n. 3
0
  private void highlightMatch(SearchMatch sm) {
    if (sm == null) {
      return;
    }

    switch (sm.getLocation()) {
      case REQUEST_HEAD:
        requestPanel.highlightHeader(sm);
        requestPanel.setTabFocus();
        requestPanel.requestFocus();
        break;
      case REQUEST_BODY:
        requestPanel.highlightBody(sm);
        requestPanel.setTabFocus();
        requestPanel.requestFocus();
        break;
      case RESPONSE_HEAD:
        responsePanel.highlightHeader(sm);
        responsePanel.setTabFocus();
        responsePanel.requestFocus();
        break;
      case RESPONSE_BODY:
        responsePanel.highlightBody(sm);
        responsePanel.setTabFocus();
        responsePanel.requestFocus();
        break;
    }
  }