View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0001437 | libmicrohttpd | portability | public | 2008-11-21 15:59 | 2008-11-21 23:33 |
| Reporter | acolomb | Assigned To | Christian Grothoff | ||
| Priority | normal | Severity | feature | Reproducibility | N/A |
| Status | closed | Resolution | won't fix | ||
| Product Version | 0.4.0pre1 | ||||
| Summary | 0001437: MHD_OPTION_SOCK_ADDR causes sockaddr portability problems | ||||
| Description | Specifying the interface address to bind to is a very useful feature. However, in order to use struct sockaddr, I need to include the appropriate system headers. This is a problem with portability since it puts the burden to find the correct headers on the MHD user. | ||||
| Additional Information | It would be more portable if there was an option to specify a host name which could be resolved by libmicrohttpd. I'm thinking of something along these lines: MHD_start_daemon(..., MHD_OPTION_BIND_INTERFACE, "localhost", // or IP "127.0.0.1" MHD_OPTION_END); I don't know the socket APIs very well (that's why I use MHD :-), but if it is possible to listen on several interfaces, maybe the option could be repeated to add more interfaces. This would be a great feature and insure portability. Thanks for this great library by the way! | ||||
| Tags | No tags attached. | ||||
|
|
Resolving would seriously complicate MHD -- especially if we consider that pretty much none of the MHD code currently is blocking and so we would have to use a non-blocking resolver for which there is no portable API AFAIK. Besides, for various reasons we already require you to manually include the right headers for the target platform before #include-ing "microhttpd.h". And the location of "struct sockaddr" is really not that complex for an autotools setup to determine. So in conclusion, I really don't think that it would be wise to bloat MHD just to allow users to not bother with including some headers. Besides, 99.99% of all useful binds for the server socket are "localhost". |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2008-11-21 15:59 | acolomb | New Issue | |
| 2008-11-21 22:59 | Christian Grothoff | Note Added: 0003749 | |
| 2008-11-21 23:33 | Christian Grothoff | Assigned To | => Christian Grothoff |
| 2008-11-21 23:33 | Christian Grothoff | Reproducibility | always => N/A |
| 2008-11-21 23:33 | Christian Grothoff | Status | new => closed |
| 2008-11-21 23:33 | Christian Grothoff | Resolution | open => won't fix |