IGS/WebServer/SimpleHttpServer.cs
File SimpleHttpServer.cs
has 486 lines of code (exceeds 250 allowed). Consider refactoring. Open
Open
using System;
using System.Collections;
using System.Collections.Specialized;
using System.IO;
using System.Net;
Method responseToFileRequest
has 45 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private bool responseToFileRequest(HttpProcessor p, string pathString)
{
string fileEnding = getFileEnding(pathString);
switch (fileEnding)
Method HandleGetRequest
has 38 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public override void HandleGetRequest(HttpProcessor p)
{
string querystring = null;
string pathstring = null;
Method HandlePostRequest
has 37 lines of code (exceeds 25 allowed). Consider refactoring. Open
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
Method sendData
has 33 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void sendData(HttpProcessor p)
{
//TODO: Write Flexible Header usage
String pathstring = null;
int iqs = p.HttpUrl.IndexOf("?");
Method WriteRedirect
has 29 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public void WriteRedirect(String new_location, int errorNumber)
{
String error = "";
switch (errorNumber)
Method isFileEnding
has 28 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
public bool isFileEnding(string pathstring)
{
string ending = getFileEnding(pathstring);
switch (ending)
Method ReadHeaders
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
Open
private void ReadHeaders()
{
Debug.WriteLine("readHeaders()");
String line;
while ((line = StreamReadLine(InputStream)) != null)
Method Process
has 26 lines of code (exceeds 25 allowed). Consider refactoring. Open
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());