[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [libmicrohttpd] GNU libmicrohttpd 0.9.0 released
From: |
Christian Grothoff |
Subject: |
Re: [libmicrohttpd] GNU libmicrohttpd 0.9.0 released |
Date: |
Tue, 27 Jul 2010 14:31:42 +0200 |
User-agent: |
KMail/1.13.3 (Linux/2.6.32-trunk-vserver-amd64; KDE/4.4.4; x86_64; ; ) |
Yes, "from_fd" is for a file descriptor (int), not a file handle (FILE*).
Simply open your file with "open", not "fopen" and it will work.
Best,
Christian
On Tuesday 27 July 2010 02:21:34 Carlos Palhares wrote:
> Not working:
>
> 43 FILE *file =
> fopen(call.file_content()->str().c_str(), "r");
> 44 response = MHD_create_response_from_fd(-1, file);
>
> /home/chjunior/workspace/milx/src/server/daemon.cpp: In static member
> function ‘static int
> Milx::Server::Daemon::_queue_response(MHD_Connection*, Milx::WebCall&)’:
> /home/chjunior/workspace/milx/src/server/daemon.cpp:44: error: invalid
> conversion from ‘FILE*’ to ‘int’
> /home/chjunior/workspace/milx/src/server/daemon.cpp:44: error:
> initializing argument 2 of ‘MHD_Response*
> MHD_create_response_from_fd(size_t, int)’
>
>
> Any advice ?
>
> I was a long time ago looking forward for this feature :)
>
> On Mon, 2010-07-26 at 23:23 +0200, Christian Grothoff wrote:
> > Dear all,
> >
> > I'm pleased to announce the release of GNU libmicrohttpd 0.9.0.
> > GNU libmicrohttpd is a small C library implementing the HTTP 1.0 and HTTP
> > 1.1 protocols. Key features that distinguish libmicrohttpd from other
> > projects are:
> >
> > * C library: fast and small
> > * API is simple, expressive and fully reentrant
> > * Implementation is HTTP 1.1 compliant
> > * HTTP server can listen on multiple ports
> > * Support for IPv6
> > * Support for incremental processing of POST data
> > * Creates binary of only 32k (without TLS/SSL support)
> > * Four different threading models (select, poll, threads, thread pool)
> > * Supported platforms include GNU/Linux, FreeBSD, OpenBSD, NetBSD,
> >
> > OS X, W32, Symbian and z/OS
> >
> > * Optional support for SSL3 and TLS (requires libgcrypt and libgnutls)
> >
> > This release adds the following new features:
> >
> > * use of external GnuTLS library (instead of internal "fork")
> >
> > => stable SSL/TLS support with all threading modes
> >
> > * passing of the listen socket by applications to support
> >
> > the creation of servers that work well with systemd
> >
> > * use of "sendfile" for faster transmission of responses from disk on
> > GNU/Linux * IPv6 sockets now only bind to IPv6 address (not to both IPv4
> > and IPv6) if
> >
> > the platform allows us to set the respective socket option
> >
> > * updated documentation
> >
> > The library is technically binary-incompatible with previous versions due
> > to changes in the SSL/TLS interface and the IPv4/IPv6 binding behaviour.
> > However, virtually all code that used previous version should work
> > without changes.
> >
> > You can download GNU libmicrohttpd from
> >
> > * ftp://ftp.gnu.org/gnu/libmicrohttpd/ and all GNU FTP mirrors.
> > * Our Subversion repository at https://gnunet.org/svn/libmicrohttpd/
> >
> > Please report bugs to our bugtracker at https://gnunet.org/bugs/.
> >
> > Additional documentation (including a reference manual and tutorial) is
> > available at the GNU libmicrohttpd website at
> > http://www.gnu.org/software/libmicrohttpd/
> >
> > Last but not least special thanks to Simon Josefsson for helping me with
> > the GnuTLS integration at GHM.
> >
> > Happy hacking!
> >
> > Christian