Mercurial > hg > ucis.core
comparison Net/HTTP.cs @ 4:9e2e6433f57a
Small fix for HTTP Server - Flash Cross Domain Policy File support
author | Ivo Smits <Ivo@UCIS.nl> |
---|---|
date | Tue, 08 Jan 2013 14:48:43 +0100 |
parents | 0cc7be03775f |
children | 5ce7a138fdba |
comparison
equal
deleted
inserted
replaced
3:0cc7be03775f | 4:9e2e6433f57a |
---|---|
102 private String ReadLine() { | 102 private String ReadLine() { |
103 StringBuilder s = new StringBuilder(); | 103 StringBuilder s = new StringBuilder(); |
104 while (true) { | 104 while (true) { |
105 int b = Stream.ReadByte(); | 105 int b = Stream.ReadByte(); |
106 if (b == -1) { | 106 if (b == -1) { |
107 if (s.Length == null) return null; | 107 if (s.Length == 0) return null; |
108 break; | 108 break; |
109 } else if (b == 13) { | 109 } else if (b == 13) { |
110 } else if (b == 10) { | 110 } else if (b == 10 || b == 0) { |
111 break; | 111 break; |
112 } else { | 112 } else { |
113 s.Append((Char)b); | 113 s.Append((Char)b); |
114 } | 114 } |
115 } | 115 } |