Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- diff --git a/src/Manos/Manos.Http/HttpMultiPartFormDataHandler.cs b/src/Manos/Manos.Http/HttpMultiPartFormDataHandler.cs
- index f44fd98..12c9e01 100644
- --- a/src/Manos/Manos.Http/HttpMultiPartFormDataHandler.cs
- +++ b/src/Manos/Manos.Http/HttpMultiPartFormDataHandler.cs
- @@ -37,6 +37,8 @@ namespace Manos.Http {
- private enum State {
- + Error,
- +
- InHeaderKey,
- InHeaderValue,
- PostHeader1,
- @@ -88,8 +90,13 @@ namespace Manos.Http {
- // string str_data = encoding.GetString (data.Bytes, pos, len);
- byte [] str_data = data.Bytes;
- - pos = -1;
- - len = str_data.Length;
- + Console.WriteLine ("POSITION: '{0}' LENGTH: '{1}'", pos, len);
- + Console.WriteLine ("the boundary: " + boundary);
- + Console.WriteLine ("STR DATA: current state: {1}\n{0}\n\n", encoding.GetString (data.Bytes, pos, len), state);
- +
- + int begin = pos;
- + pos = begin - 1;
- + len = data.Length;
- while (pos < len - 1 && state != State.Finished) {
- @@ -119,6 +126,11 @@ namespace Manos.Http {
- stream.Write (str_data, pos + 1, str_data.Length - pos - 1);
- str_data = stream.ToArray ();
- + Console.WriteLine ("no longer in boundary: '{0}' '{1}' '{2}' '{3}'", (char) c, pos - begin, index, boundary [index]);
- + Console.WriteLine ("new data:");
- + Console.WriteLine (encoding.GetString (str_data));
- + Console.WriteLine ();
- +
- pos = -1;
- len = str_data.Length;
Add Comment
Please, Sign In to add comment