April 03, 2012
On Tuesday, 3 April 2012 at 08:42:01 UTC, Xan wrote:
> I receive errors:

I changed some stuff since the beginning of thi thread.

cgi.d now includes a http server without needing the other
modules.

So if you just get the new cgi.d, you can:

dmd server.d cgi.d -version=embedded_httpd


without bothering with the httpd.d nor netman.d


April 03, 2012
On Tuesday, 3 April 2012 at 11:39:24 UTC, Timon Gehr wrote:
> You can just comment out the code there (afaik it is only a custom formatting routine), or compile with the -d flag.

You're probably thinking of the std.date use in web.d.
This one though is just older stuff that you don't need
with the new cgi.d.

BTW the Phobos team deciding to break std.date is still
probably the #1 thing that has made me mad in D's life,
though if -property becomes the default, we'll have a
new king.
April 03, 2012
>>
>> Thanks,
>
> You can just comment out the code there (afaik it is only a custom formatting routine), or compile with the -d flag.

$ gdmd-4.6 -d server.d cgi.d netman.d httpd.d
Notice: As of Phobos 2.055, std.date and std.dateparse have been deprecated. They will be removed in February 2012. Please use std.datetime instead.
httpd.d:72: Error: undefined identifier peerAddress
httpd.d:72: Error: constructor cgi.Cgi.this (long maxContentLength = cast(long)5000000, in const(immutable(char)[][string]) env = null, const(ubyte)[] delegate() readdata = null, void delegate(const(ubyte)[]) _rawDataOutput = null) is not callable using argument types (string[],immutable(ubyte)[],_error_,void delegate(const(ubyte)[]))


What happens now?



April 03, 2012
And with comment the UTC line I get:

s$ gdmd-4.6 server.d cgi.d netman.d httpd.d
Notice: As of Phobos 2.055, std.date and std.dateparse have been deprecated. They will be removed in February 2012. Please use std.datetime instead.
httpd.d:72: Error: undefined identifier peerAddress
httpd.d:72: Error: constructor cgi.Cgi.this (long maxContentLength = cast(long)5000000, in const(immutable(char)[][string]) env = null, const(ubyte)[] delegate() readdata = null, void delegate(const(ubyte)[]) _rawDataOutput = null) is not callable using argument types (string[],immutable(ubyte)[],_error_,void delegate(const(ubyte)[]))



April 03, 2012
On Tuesday, 3 April 2012 at 19:07:10 UTC, Xan wrote:
> What happens now?

Use the newer standalone code:

http://forum.dlang.org/thread/cifekffsnaimfsvuxlrw@forum.dlang.org?page=2#post-pfojnbnvhuahnyviekut:40forum.dlang.org

don't need netman.d anymore. Just use:

gdmd server.d cgi.d -version=embedded_httpd

to compile it.
April 03, 2012
Am 19.03.2012 20:36, schrieb Xan:
> On Sunday, 18 March 2012 at 05:19:48 UTC, Kapps wrote:
>> On Saturday, 17 March 2012 at 20:52:33 UTC, Xan wrote:
>>> So, there is not built-in functions?
>>>
>>> Thanks,
>>> Xan.
>>>
>>
>> There's no built in webserver class, and it's not something that
>> should be in the standard library in the first place.
>
> A pain. A planning for that?
Why is this a pain, I don't see the problem. You've got an awesome solution, just because it's not in Phobos? I don't understand why people hate to install (it's not even installing just downloading) libs.
April 04, 2012
On Tuesday, 3 April 2012 at 13:33:19 UTC, Adam D. Ruppe wrote:
> On Tuesday, 3 April 2012 at 08:42:01 UTC, Xan wrote:
>> I receive errors:
>
> I changed some stuff since the beginning of thi thread.
>
> cgi.d now includes a http server without needing the other
> modules.
>
> So if you just get the new cgi.d, you can:
>
> dmd server.d cgi.d -version=embedded_httpd
>
>
> without bothering with the httpd.d nor netman.d


Not, I receive the error:

$ gdmd-4.6 server.d cgi.d -version=embedded_httpd
std.algorithm.indexOf has been scheduled for deprecation. You may want to use std.algorithm.countUntil instead.
cgi.d:2231: Error: undefined identifier lastSocketError


April 04, 2012
On Wednesday, 4 April 2012 at 08:04:14 UTC, Xan wrote:
> Not, I receive the error:

What version of D is that?

lastSocketError is in phobos:
http://dlang.org/phobos/std_socket.html#lastSocketError

and it should work in windows and linux.

Maybe your compiler is old.
April 04, 2012
> Not, I receive the error:
>
> $ gdmd-4.6 server.d cgi.d -version=embedded_httpd
> std.algorithm.indexOf has been scheduled for deprecation. You may want
> to use std.algorithm.countUntil instead.

Oh my, indexOf was deprecated? News to me.

> cgi.d:2231: Error: undefined identifier lastSocketError
>
>


-- 
Dmitry Olshansky
1 2
Next ›   Last »