Switch to unified view

a/src/httpgate.cpp b/src/httpgate.cpp
...
...
81
    case MHD_FOOTER_KIND: return "HTTP footer";
81
    case MHD_FOOTER_KIND: return "HTTP footer";
82
    default: return "Unknown";
82
    default: return "Unknown";
83
    }
83
    }
84
}
84
}
85
85
86
#ifdef PRINT_KEYS
86
static int print_out_key (void *cls, enum MHD_ValueKind kind, 
87
static int print_out_key (void *cls, enum MHD_ValueKind kind, 
87
                          const char *key, const char *value)
88
                          const char *key, const char *value)
88
{
89
{
89
    LOGDEB(ValueKindToCp(kind) << ": " << key << " -> " << value << endl);
90
    LOGDEB(ValueKindToCp(kind) << ": " << key << " -> " << value << endl);
90
    return MHD_YES;
91
    return MHD_YES;
91
}
92
}
93
#endif /* PRINT_KEYS */
92
94
93
// This gets called by microhttpd when it needs data.
95
// This gets called by microhttpd when it needs data.
94
static ssize_t
96
static ssize_t
95
data_generator(void *cls, uint64_t pos, char *buf, size_t max)
97
data_generator(void *cls, uint64_t pos, char *buf, size_t max)
96
{
98
{
...
...
202
                                size_t *upload_data_size, void **con_cls)
204
                                size_t *upload_data_size, void **con_cls)
203
{
205
{
204
    LOGDEB("answer_to_connection: url " << url << " method " << method << 
206
    LOGDEB("answer_to_connection: url " << url << " method " << method << 
205
           " version " << version << endl);
207
           " version " << version << endl);
206
208
209
#ifdef PRINT_KEYS
207
    //MHD_get_connection_values(connection, MHD_HEADER_KIND, &print_out_key, 0);
210
    MHD_get_connection_values(connection, MHD_HEADER_KIND, &print_out_key, 0);
211
#endif
208
212
209
    static int aptr;
213
    static int aptr;
210
    if (&aptr != *con_cls) {
214
    if (&aptr != *con_cls) {
211
        /* do not respond on first call */
215
        /* do not respond on first call */
212
        *con_cls = &aptr;
216
        *con_cls = &aptr;