View Issue Details
| ID | Project | Category | View Status | Date Submitted | Last Update |
|---|---|---|---|---|---|
| 0004058 | libmicrohttpd | external API | public | 2015-11-17 12:36 | 2016-05-02 09:16 |
| Reporter | sdr | Assigned To | Christian Grothoff | ||
| Priority | normal | Severity | trivial | Reproducibility | always |
| Status | closed | Resolution | won't fix | ||
| Product Version | 0.9.46 | ||||
| Target Version | 0.9.46 | Fixed in Version | 0.9.46 | ||
| Summary | 0004058: MHD_create_response_from_buffer switch from 'char *' to 'const char *' | ||||
| Description | MHD_create_response_from_buffer uses char * argument which makes it harder to use it with string literals which are const char * If the contents of the buffer is not changed in the process of sending the request (it should not!) then it must be simple a change here-and-there to make the compiler happy | ||||
| Steps To Reproduce | #define RESP_NOTF "NOT FOUND!" ... HD_create_response_from_buffer(sizeof(RESP_NOTF),RESP_NOTF,MHD_RESPMEM_PERSISTENT); | ||||
| Tags | No tags attached. | ||||
|
|
It turns out it is not trivial to switch to const * as the same buffer is used for file reading. Probably it will be best to provide MHD_create_response_from_const_buffer which will check the response structure and do the cast. This might be important for embeded developers as on some platforms .rodata realy might be RO :) |
|
|
Adding an extra symbol increases linker costs and object size for shared libraries. All we have here, as far as I can see, is that the developer may have to put an explicit cast to eliminate a compiler warning. Or is there more that I'm missing? |
| Date Modified | Username | Field | Change |
|---|---|---|---|
| 2015-11-17 12:36 | sdr | New Issue | |
| 2015-11-20 09:40 | sdr | Note Added: 0009929 | |
| 2015-11-21 11:14 | Christian Grothoff | Note Added: 0009937 | |
| 2015-11-21 11:14 | Christian Grothoff | Assigned To | => Christian Grothoff |
| 2015-11-21 11:14 | Christian Grothoff | Status | new => feedback |
| 2016-05-02 09:16 | Christian Grothoff | Status | feedback => closed |
| 2016-05-02 09:16 | Christian Grothoff | Resolution | open => won't fix |
| 2016-05-02 09:16 | Christian Grothoff | Product Version | => 0.9.46 |
| 2016-05-02 09:16 | Christian Grothoff | Fixed in Version | => 0.9.46 |
| 2016-05-02 09:16 | Christian Grothoff | Target Version | => 0.9.46 |
| 2024-01-21 13:24 | Christian Grothoff | Category | libmicrohttpd API => external API |