fix #187: http context functions need to take ctx parameter