question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Provide http(s) default port method

See original GitHub issue

It feels like a magic number to use 80 or 443 in the UriConfigurer#withPort method to suppress the port output given the right scheme.

There should be a method to set this magic number without user getting to see or having to use it like withHttpPort or withHttpsPort.

I know it is a small change but I think the right way is to discuss it before opening a PR.

Issue Analytics

  • State:open
  • Created 7 years ago
  • Comments:6 (6 by maintainers)

github_iconTop GitHub Comments

1reaction
wilkinsonacommented, Feb 9, 2017

How about withHttp() and withHttps() methods that set both the scheme and the port? They’d be shorthand for withScheme("http").withPort(80) and withScheme("https").withPort(443) respectively.

0reactions
meistermeiercommented, Feb 14, 2017

This simple improvement just points out how complicated it can be to introduce such a little change. I can understand that the pro and cons put this on the bottom on the list. (deleting local branch 😁 )

Read more comments on GitHub >

github_iconTop Results From Across the Web

Default Port Numbers - Oracle Help Center
Port IP Protocol Direction 22 TCP SSH To library 25 TCP SMTP From library 53 TCP & UDP DNS From library
Read more >
Enable ports 80 (HTTP) and 443 (HTTPS) - PaperCut
Enable ports 80 (HTTP) and 443 (HTTPS). By default, PaperCut NG/MF listens to ports 9191 and 9192 for HTTP and HTTPS communication respectively....
Read more >
Why do we need to specify a port number while using HTTP ...
The default port for HTTP is 80 and HTTPS is 443 but port numbers range from 0 to 65535. Most web servers listen...
Read more >
What are port numbers and how do they work? - TechTarget
Port 80. HTTP is the protocol that enables the World Wide Web. Port 123. Network Time Protocol helps computer clocks sync with each...
Read more >
Configure client communication ports - Configuration Manager
The default values for client request ports are 80 for HTTP traffic and 443 for HTTPS traffic. Change them only if you don't...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found