teco-kit/PointAndControl

View on GitHub
IGS/WebServer/SimpleHttpServer.cs

Summary

Maintainability
D
2 days
Test Coverage

File SimpleHttpServer.cs has 486 lines of code (exceeds 250 allowed). Consider refactoring.
Open

using System;
using System.Collections;
using System.Collections.Specialized;
using System.IO;
using System.Net;
Severity: Minor
Found in IGS/WebServer/SimpleHttpServer.cs - About 7 hrs to fix

    Method responseToFileRequest has 45 lines of code (exceeds 25 allowed). Consider refactoring.
    Open

            private bool responseToFileRequest(HttpProcessor p, string pathString)
            {
                string fileEnding = getFileEnding(pathString);
    
                switch (fileEnding)
    Severity: Minor
    Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

      Method HandleGetRequest has 38 lines of code (exceeds 25 allowed). Consider refactoring.
      Open

              public override void HandleGetRequest(HttpProcessor p)
              {
      
                  string querystring = null;
                  string pathstring = null;
      Severity: Minor
      Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

        Method HandlePostRequest has 37 lines of code (exceeds 25 allowed). Consider refactoring.
        Open

                public void HandlePostRequest()
                {
                    // this post data processing just reads everything into a memory stream.
                    // this is fine for smallish things, but for large stuff we should really
                    // hand an input stream to the request processor. However, the input stream 
        Severity: Minor
        Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

          Method sendData has 33 lines of code (exceeds 25 allowed). Consider refactoring.
          Open

                  private void sendData(HttpProcessor p)
                  {
                      //TODO: Write Flexible Header usage
                      String pathstring = null;
                      int iqs = p.HttpUrl.IndexOf("?");
          Severity: Minor
          Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

            Method WriteRedirect has 29 lines of code (exceeds 25 allowed). Consider refactoring.
            Open

                    public void WriteRedirect(String new_location, int errorNumber)
                    {
                        String error = "";
            
                        switch (errorNumber)
            Severity: Minor
            Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

              Method isFileEnding has 28 lines of code (exceeds 25 allowed). Consider refactoring.
              Open

                      public bool isFileEnding(string pathstring)
                      {
                          string ending = getFileEnding(pathstring);
              
                          switch (ending)
              Severity: Minor
              Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

                Method ReadHeaders has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                Open

                        private void ReadHeaders()
                        {
                            Debug.WriteLine("readHeaders()");
                            String line;
                            while ((line = StreamReadLine(InputStream)) != null)
                Severity: Minor
                Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

                  Method Process has 26 lines of code (exceeds 25 allowed). Consider refactoring.
                  Open

                          public void Process()
                          {
                              // we can't use a StreamReader for input, because it buffers up extra data on us inside it's
                              // "processed" view of the world, and we want the data raw after the headers
                              InputStream = new BufferedStream(Socket.GetStream());
                  Severity: Minor
                  Found in IGS/WebServer/SimpleHttpServer.cs - About 1 hr to fix

                    There are no issues that match your filters.

                    Category
                    Status