<?xml version="1.0"?><?xml-stylesheet type="text/xsl" href="/rss.xsl"?><rss version="2.0"><channel><title>C# WebServer</title><link>http://webserver.codeplex.com/project/feeds/rss</link><description>An embeddable and extensible web server that supports controllers, dynamic templates &amp;#40;which are recompiled in runtime if changed on disc&amp;#41;, haml, multiple web sites, reverse proxying, http digest, http basic auth and more.</description><item><title>New Post: Implimenting SPENGO authentication</title><link>http://webserver.codeplex.com/discussions/51315</link><description>&lt;div style="line-height: normal;"&gt;Any Chance to achieve an SSPI Integration?&lt;br /&gt;
&lt;br /&gt;
i have no glue where to start.&lt;br /&gt;
&lt;br /&gt;
i am open for ideas.&lt;br /&gt;
best regards&lt;br /&gt;
Kai&lt;br /&gt;
&lt;/div&gt;</description><author>kaiwachter</author><pubDate>Fri, 12 Apr 2013 12:23:30 GMT</pubDate><guid isPermaLink="false">New Post: Implimenting SPENGO authentication 20130412122330P</guid></item><item><title>New Post: x64 embedded?</title><link>http://webserver.codeplex.com/discussions/439339</link><description>&lt;div style="line-height: normal;"&gt;hello&lt;br /&gt;
&lt;br /&gt;
Can Codeplex webserver be embedded with 64bit application?&lt;br /&gt;
&lt;br /&gt;
Thanks&lt;br /&gt;
&lt;/div&gt;</description><author>devvvy</author><pubDate>Sat, 06 Apr 2013 11:12:30 GMT</pubDate><guid isPermaLink="false">New Post: x64 embedded? 20130406111230A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;DELETED&lt;br /&gt;
&lt;/div&gt;</description><author>wo80</author><pubDate>Fri, 05 Apr 2013 11:54:32 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405115432A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;DELETED&lt;br /&gt;
&lt;/div&gt;</description><author>wo80</author><pubDate>Fri, 05 Apr 2013 11:54:32 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405115432A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;P.S. Sorry, POST data fixes were done in HttpServer itself, not in Addons, so it's not related to your last post.&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 11:46:27 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405114627A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;P.S. Sorry, POST data fixes were done in HttpServer itself, not in Addons, so it's not related to your last post.&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 11:46:27 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405114627A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;Thank you. Have you also fixed an issue with missing POST data? I had to fix it locally, it's more or less along the lines of this thread:&lt;br /&gt;
&lt;a href="https://webserver.codeplex.com/discussions/229392" rel="nofollow"&gt;https://webserver.codeplex.com/discussions/229392&lt;/a&gt;&lt;br /&gt;
(EDIT: our version may be obsolete compared to latest releases)&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 11:31:25 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405113125A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;Thank you. Have you also fixed an issue with missing POST data? I had to fix it locally, it's more or less along the lines of this thread:&lt;br /&gt;
&lt;a href="https://webserver.codeplex.com/discussions/229392" rel="nofollow"&gt;https://webserver.codeplex.com/discussions/229392&lt;/a&gt;&lt;br /&gt;
(EDIT: our version may be obsolete compared to latest releases)&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 11:31:25 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405113125A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;I updated the code. There are some breaking changes, so also have a look at the example on the webpage.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://wo80.hostingsociety.com/p/httpserver.addons/" rel="nofollow"&gt;http://wo80.hostingsociety.com/p/httpserver.addons/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Regarding your problem: the code for setting the CGI headers is now in CgiModule.cs in the HttpServer.Addons.Modules namespace.&lt;br /&gt;
&lt;/div&gt;</description><author>wo80</author><pubDate>Fri, 05 Apr 2013 10:58:52 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405105852A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;I updated the code. There are some breaking changes, so also have a look at the example on the webpage.&lt;br /&gt;
&lt;br /&gt;
&lt;a href="http://wo80.hostingsociety.com/p/httpserver.addons/" rel="nofollow"&gt;http://wo80.hostingsociety.com/p/httpserver.addons/&lt;/a&gt;&lt;br /&gt;
&lt;br /&gt;
Regarding your problem: the code for setting the CGI headers is now in CgiModule.cs in the HttpServer.Addons.Modules namespace.&lt;br /&gt;
&lt;/div&gt;</description><author>wo80</author><pubDate>Fri, 05 Apr 2013 10:58:52 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405105852A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;Ok I think I made it work.&lt;br /&gt;
&lt;br /&gt;
We use the version from here:&lt;br /&gt;
&lt;a href="http://wo80.hostingsociety.com/p/httpserver.addons/#download" rel="nofollow"&gt;http://wo80.hostingsociety.com/p/httpserver.addons/#download&lt;/a&gt;&lt;br /&gt;
downloaded somewhere in March 2013.&lt;br /&gt;
&lt;br /&gt;
I added the code to CgiHeaders.cs ParseCgiHeaders() function (see code between // DD START and // DD END comments):&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;        public static void ParseCgiHeaders(ref string cgiOutput, IResponse response)
        {
            // TODO: Make this more robust (are we really stripping headers???)
            int index = cgiOutput.IndexOf(&amp;quot;\r\n\r\n&amp;quot;);

            if (index != -1)
            {
                string header = cgiOutput.Substring(0, index + 2);
                cgiOutput = cgiOutput.Substring(index + 2);

                int end = header.IndexOf(&amp;quot;\r\n&amp;quot;);

                while (end != -1)
                {
                    string line = header.Substring(0, end);
                    header = header.Substring(end + 2);

                    int colonIndex = line.IndexOf(&amp;quot;:&amp;quot;);
                    if (colonIndex &amp;lt;= 1)
                        break;

                    string val = line.Substring(colonIndex + 1).Trim();
                    string name = line.Substring(0, colonIndex).Trim();

                    // TODO !!!
                    if (name.ToLowerInvariant() == &amp;quot;content-type&amp;quot;)
                    {
                        response.ContentType.Value = val;
                    }
                    // DD START fix redirecion by Location header:
                    else if (name.ToLowerInvariant() == &amp;quot;location&amp;quot;)
                    {
                        response.Redirect(val);
                    }
                    // DD END fix redirecion by Location header
                    else
                    {
                        response.Add(new StringHeader(name, val));
                    }

                    end = header.IndexOf(&amp;quot;\r\n&amp;quot;);
                }
            }

            cgiOutput = cgiOutput.Trim();
        }
&lt;/code&gt;&lt;/pre&gt;

Thank you everyone, I would have had heavy difficulties finding it on my own..&lt;br /&gt;
&lt;br /&gt;
Sincerely&lt;br /&gt;
D&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 09:31:36 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405093136A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;Ok I think I made it work.&lt;br /&gt;
&lt;br /&gt;
We use the version from here:&lt;br /&gt;
&lt;a href="http://wo80.hostingsociety.com/p/httpserver.addons/#download" rel="nofollow"&gt;http://wo80.hostingsociety.com/p/httpserver.addons/#download&lt;/a&gt;&lt;br /&gt;
downloaded somewhere in March 2013.&lt;br /&gt;
&lt;br /&gt;
I added the code to CgiHeaders.cs ParseCgiHeaders() function (see code between // DD START and // DD END comments):&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;        public static void ParseCgiHeaders(ref string cgiOutput, IResponse response)
        {
            // TODO: Make this more robust (are we really stripping headers???)
            int index = cgiOutput.IndexOf(&amp;quot;\r\n\r\n&amp;quot;);

            if (index != -1)
            {
                string header = cgiOutput.Substring(0, index + 2);
                cgiOutput = cgiOutput.Substring(index + 2);

                int end = header.IndexOf(&amp;quot;\r\n&amp;quot;);

                while (end != -1)
                {
                    string line = header.Substring(0, end);
                    header = header.Substring(end + 2);

                    int colonIndex = line.IndexOf(&amp;quot;:&amp;quot;);
                    if (colonIndex &amp;lt;= 1)
                        break;

                    string val = line.Substring(colonIndex + 1).Trim();
                    string name = line.Substring(0, colonIndex).Trim();

                    // TODO !!!
                    if (name.ToLowerInvariant() == &amp;quot;content-type&amp;quot;)
                    {
                        response.ContentType.Value = val;
                    }
                    // DD START fix redirecion by Location header:
                    else if (name.ToLowerInvariant() == &amp;quot;location&amp;quot;)
                    {
                        response.Redirect(val);
                    }
                    // DD END fix redirecion by Location header
                    else
                    {
                        response.Add(new StringHeader(name, val));
                    }

                    end = header.IndexOf(&amp;quot;\r\n&amp;quot;);
                }
            }

            cgiOutput = cgiOutput.Trim();
        }
&lt;/code&gt;&lt;/pre&gt;

Thank you everyone, I would have had heavy difficulties finding it on my own..&lt;br /&gt;
&lt;br /&gt;
Sincerely&lt;br /&gt;
D&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 09:31:36 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405093136A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;I think we use another version; there's no such function in CgiHeaders.cs, but there's ParseCgiHeaders() (with several ToDo comments), I will try to look into it..&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 09:08:22 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405090822A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;I think we use another version; there's no such function in CgiHeaders.cs, but there's ParseCgiHeaders() (with several ToDo comments), I will try to look into it..&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 09:08:22 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405090822A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;If you are using the code from &lt;a href="http://wo80.hostingsociety.com/p/httpserver.addons" rel="nofollow"&gt;http://wo80.hostingsociety.com/p/httpserver.addons&lt;/a&gt; :&lt;br /&gt;
&lt;br /&gt;
Open CgiHandler.cs and add the 302 to the GetStatusCode method:&lt;br /&gt;
&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;"&gt;static&lt;/span&gt; HttpStatusCode GetStatusCode(&lt;span style="color:Blue;"&gt;string&lt;/span&gt; value)
{
    &lt;span style="color:Blue;"&gt;if&lt;/span&gt; (value.StartsWith(&lt;span style="color:#A31515;"&gt;&amp;quot;404&amp;quot;&lt;/span&gt;))
    {
        &lt;span style="color:Blue;"&gt;return&lt;/span&gt; HttpStatusCode.NotFound;
    }
    &lt;span style="color:Blue;"&gt;else&lt;/span&gt; &lt;span style="color:Blue;"&gt;if&lt;/span&gt; (value.StartsWith(&lt;span style="color:#A31515;"&gt;&amp;quot;401&amp;quot;&lt;/span&gt;))
    {
        &lt;span style="color:Blue;"&gt;return&lt;/span&gt; HttpStatusCode.Unauthorized;
    }
    &lt;span style="color:Blue;"&gt;else&lt;/span&gt; &lt;span style="color:Blue;"&gt;if&lt;/span&gt; (value.StartsWith(&lt;span style="color:#A31515;"&gt;&amp;quot;302&amp;quot;&lt;/span&gt;))
    {
        &lt;span style="color:Blue;"&gt;return&lt;/span&gt; HttpStatusCode.Redirect;
    }

    &lt;span style="color:Blue;"&gt;return&lt;/span&gt; HttpStatusCode.OK;
}
&lt;/pre&gt;&lt;/div&gt;This should fix the problem.&lt;br /&gt;
&lt;/div&gt;</description><author>wo80</author><pubDate>Fri, 05 Apr 2013 08:58:27 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405085827A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;If you are using the code from &lt;a href="http://wo80.hostingsociety.com/p/httpserver.addons" rel="nofollow"&gt;http://wo80.hostingsociety.com/p/httpserver.addons&lt;/a&gt; :&lt;br /&gt;
&lt;br /&gt;
Open CgiHandler.cs and add the 302 to the GetStatusCode method:&lt;br /&gt;
&lt;div style="color:Black;background-color:White;"&gt;&lt;pre&gt;
&lt;span style="color:Blue;"&gt;private&lt;/span&gt; &lt;span style="color:Blue;"&gt;static&lt;/span&gt; HttpStatusCode GetStatusCode(&lt;span style="color:Blue;"&gt;string&lt;/span&gt; value)
{
    &lt;span style="color:Blue;"&gt;if&lt;/span&gt; (value.StartsWith(&lt;span style="color:#A31515;"&gt;&amp;quot;404&amp;quot;&lt;/span&gt;))
    {
        &lt;span style="color:Blue;"&gt;return&lt;/span&gt; HttpStatusCode.NotFound;
    }
    &lt;span style="color:Blue;"&gt;else&lt;/span&gt; &lt;span style="color:Blue;"&gt;if&lt;/span&gt; (value.StartsWith(&lt;span style="color:#A31515;"&gt;&amp;quot;401&amp;quot;&lt;/span&gt;))
    {
        &lt;span style="color:Blue;"&gt;return&lt;/span&gt; HttpStatusCode.Unauthorized;
    }
    &lt;span style="color:Blue;"&gt;else&lt;/span&gt; &lt;span style="color:Blue;"&gt;if&lt;/span&gt; (value.StartsWith(&lt;span style="color:#A31515;"&gt;&amp;quot;302&amp;quot;&lt;/span&gt;))
    {
        &lt;span style="color:Blue;"&gt;return&lt;/span&gt; HttpStatusCode.Redirect;
    }

    &lt;span style="color:Blue;"&gt;return&lt;/span&gt; HttpStatusCode.OK;
}
&lt;/pre&gt;&lt;/div&gt;This should fix the problem.&lt;br /&gt;
&lt;/div&gt;</description><author>wo80</author><pubDate>Fri, 05 Apr 2013 08:58:27 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405085827A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;P.S. I think I found it, in Response.cs  Response() method. I will modify and post here the results..&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 08:26:08 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405082608A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;P.S. I think I found it, in Response.cs  Response() method. I will modify and post here the results..&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 08:26:08 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405082608A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;I've already tied to set the Status header, and I've tried the code from StackOverflow, as follows:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;header(&amp;quot;Status: 302&amp;quot;); // for fast cgi
header($_SERVER['SERVER_PROTOCOL'] . &amp;quot; 302&amp;quot;);&lt;/code&gt;&lt;/pre&gt;

and&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;header(&amp;quot;Status: 302 Found&amp;quot;); // for fast cgi
header($_SERVER['SERVER_PROTOCOL'] . &amp;quot; 302 Found&amp;quot;);&lt;/code&gt;&lt;/pre&gt;

and in FireBug I see that Status header is sent, but &amp;quot;Status of received responces&amp;quot; (Status column in Network output) is still &amp;quot;200 Made by Jonas Gauffin&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Could you please hint me where to make the changes in the source code?&lt;br /&gt;
&lt;br /&gt;
Thank you for your support&lt;br /&gt;
D&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 08:20:14 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405082014A</guid></item><item><title>New Post: PHP header function - redirection does not work using header("Location: url")</title><link>http://webserver.codeplex.com/discussions/439196</link><description>&lt;div style="line-height: normal;"&gt;I've already tied to set the Status header, and I've tried the code from StackOverflow, as follows:&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;header(&amp;quot;Status: 302&amp;quot;); // for fast cgi
header($_SERVER['SERVER_PROTOCOL'] . &amp;quot; 302&amp;quot;);&lt;/code&gt;&lt;/pre&gt;

and&lt;br /&gt;
&lt;pre&gt;&lt;code&gt;header(&amp;quot;Status: 302 Found&amp;quot;); // for fast cgi
header($_SERVER['SERVER_PROTOCOL'] . &amp;quot; 302 Found&amp;quot;);&lt;/code&gt;&lt;/pre&gt;

and in FireBug I see that Status header is sent, but &amp;quot;Status of received responces&amp;quot; (Status column in Network output) is still &amp;quot;200 Made by Jonas Gauffin&amp;quot;.&lt;br /&gt;
&lt;br /&gt;
Could you please hint me where to make the changes in the source code?&lt;br /&gt;
&lt;br /&gt;
Thank you for your support&lt;br /&gt;
D&lt;br /&gt;
&lt;/div&gt;</description><author>DDefn</author><pubDate>Fri, 05 Apr 2013 08:20:14 GMT</pubDate><guid isPermaLink="false">New Post: PHP header function - redirection does not work using header("Location: url") 20130405082014A</guid></item></channel></rss>