public void httpRequest(HttpRequestEvent e) throws java.io.IOException {
  String request=e.getRequest();
  if (Debug.debugging("shis")) {
    Debug.output("SHIS: Handling request - \"" + request + "\"");
  }
  if (request.charAt(0) == '/') {
    request=request.substring(0,request.length());
  }
  int index=0;
  index=request.indexOf('?');
  if (index != -1) {
    request=request.substring(index + 1,request.length());
    Debug.message("shis","SHIS: GET Request received");
  }
 else {
    Debug.message("shis","SHIS: Probably a POST Request received");
  }
  try {
    iServer.handleRequest(request,e.getOutputStream());
  }
 catch (  IOException ioe) {
    Debug.error("SHIS: caught IOException - \n" + ioe.getMessage());
  }
catch (  MapRequestFormatException exception) {
    String message="OpenMap SimpleHttpImageServer encountered an problem with your request:\n\n" + exception.getMessage() + "\n\n"+ ErrorMessage;
    HttpConnection.writeHttpResponse(e.getOutputStream(),HttpConnection.CONTENT_PLAIN,message);
  }
}

public void httpRequest ( HttpRequestEvent e ) throws java . io . IOException { String request = e . getRequest ( ) ; if ( Debug . debugging ( "shis" ) ) { Debug . output ( "SHIS: Handling request - \"" + request + "\"" ) ; } if ( request . charAt ( 0 ) == '/' ) { request = request . substring ( 0 , request . length ( ) ) ; } int index = 0 ; index = request . indexOf ( '?' ) ; if ( index != - 1 ) { request = request . substring ( index + 1 , request . length ( ) ) ; Debug . message ( "shis" , "SHIS: GET Request received" ) ; } else { Debug . message ( "shis" , "SHIS: Probably a POST Request received" ) ; } try { iServer . handleRequest ( request , e . getOutputStream ( ) ) ; } catch ( IOException ioe ) { Debug . error ( "SHIS: caught IOException - \n" + ioe . getMessage ( ) ) ; } catch ( MapRequestFormatException exception ) { String message = "OpenMap SimpleHttpImageServer encountered an problem with your request:\n\n" + exception . getMessage ( ) + "\n\n" + ErrorMessage ; HttpConnection . writeHttpResponse ( e . getOutputStream ( ) , HttpConnection . CONTENT_PLAIN , message ) ; } }
invoked when an http request is received .
