mirror of
http://git.haproxy.org/git/haproxy.git/
synced 2025-01-03 02:32:03 +00:00
MINOR: WURFL: call header_retireve_callback() in dummy library
The current coverage of the dummy library was limited because the callbacks passed to wurfl_lookup() were not called. Now we do call them with one existing and one non-existing headers to make sure that ha_wurfl_retrieve_header() is covered by the tests as well.
This commit is contained in:
parent
d173e93aa7
commit
e30e3001d9
@ -67,6 +67,11 @@ wurfl_error wurfl_load(wurfl_handle hwurfl)
|
||||
|
||||
wurfl_device_handle wurfl_lookup(wurfl_handle hwurfl, wurfl_header_retrieve_callback header_retrieve_callback, const void *header_retrieve_callback_data)
|
||||
{
|
||||
// call callback, on a probably existing header
|
||||
const char *hvalue = header_retrieve_callback("User-Agent", header_retrieve_callback_data);
|
||||
// and on a non existing one
|
||||
hvalue = header_retrieve_callback("Non-Existing-Header", header_retrieve_callback_data);
|
||||
|
||||
return (void *) 0xdeffa;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user