-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- New HeaderWriter class to move some code out of FosRequest - Sanitized the Listener's loop quite a bit - Changes to adapt to FastCgiNet
- Loading branch information
Showing
21 changed files
with
481 additions
and
311 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System; | ||
using System.Linq; | ||
using NUnit.Framework; | ||
using Fos; | ||
using Fos.Streams; | ||
using System.IO; | ||
|
||
namespace Fos.Tests | ||
{ | ||
[TestFixture] | ||
public class HeaderWriterTests | ||
{ | ||
[Test] | ||
public void OnFirstWriteAndOnStreamFillEvents() | ||
{ | ||
byte[] buf = new byte[1024]; | ||
using (var s = new MemoryStream(buf)) | ||
{ | ||
using (var writer = new HeaderWriter(s)) | ||
{ | ||
writer.Write("Status", "200"); | ||
writer.WriteLine(); | ||
} | ||
} | ||
|
||
int writtenLength = "Status: 200\r\n\r\n".Length; | ||
var contents = System.Text.ASCIIEncoding.ASCII.GetString(buf, 0, writtenLength); | ||
Assert.AreEqual("Status: 200\r\n\r\n", contents); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.