httpbeast icon indicating copy to clipboard operation
httpbeast copied to clipboard

Inconsistent behavior on run()

Open waghanza opened this issue 4 years ago • 4 comments

Hi @dom96,

When specifying settings (port, bind address, ...), the domain is set to AF_UNSPEC. However, without settings, the domain is set to AF_INET

This make https://github.com/dom96/httpbeast/blob/b33dba93a134faa2adc3b991cb69890375987076/src/httpbeast.nim#L464 and https://github.com/dom96/httpbeast/blob/b33dba93a134faa2adc3b991cb69890375987076/src/httpbeast.nim#L492 have different behavior (except if we specify domain for the first one)

Regards,


Related to https://github.com/the-benchmarker/web-frameworks/pull/4554

waghanza avatar Aug 18 '21 09:08 waghanza

Will keep this to remind me to add an error when Settings is initialised incorrectly.

dom96 avatar Aug 23 '21 09:08 dom96

How can you override Settings @dom96 ?

waghanza avatar Nov 25 '22 15:11 waghanza

You mean https://github.com/dom96/httpbeast/blob/master/src/httpbeast.nim#L557?

dom96 avatar Nov 25 '22 20:11 dom96

exactly, but seems that you need to set by hand in https://github.com/mattaylor/whip/blob/a9fd1f04ba0167727dd0dbf9235791f708147992/whip.nim#L132 @mattaylor

@dom96 maybe a good idea to allow it to be overwritten by end-user (I mean with a compilation option or nim.cfg)

waghanza avatar Nov 25 '22 20:11 waghanza