Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bad Request - Invalid Hostname #124

Open
josephfo opened this issue Jul 28, 2019 · 2 comments

Comments

@josephfo
Copy link

commented Jul 28, 2019

After setting up my smee channel, I'm using this command line:
smee -u https://smee.io/ -t https://localhost:44359/api/issues
full-smee-output.txt

I have an ASPNet Core WebApi controller running locally on port 44359 - that I want to handle these requests coming from smee.

I'm sure it's something on my side, but hoping someone can let me know what I'm doing wrong.

I updated smee index.js to echo out the request object, and I see the POST is being made to https://localhost:44359/api/issues (see below). If I make this same POST request using fiddler, my breakpoint is hit in the ASPNet Core controller - which is the desired behavior. But when smee makes the request, I see this error:

         '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01//EN""http://www.w3.org/TR/html4/strict.dtd">\r\n<HTML><HEAD><TITLE>Bad Request</TITLE>\r\n<META HTTP-EQUIV="Content-Type" Content="text/html; charset=us-ascii"></HEAD>\r\n<BODY><h2>Bad Request - Invalid Hostname</h2>\r\n<hr><p>HTTP Error 400. The request hostname is invalid.</p>\r\n</BODY></HTML>\r\n' },

Full smee output attached.

Request {
  _events: {},
  _eventsCount: 0,
  _maxListeners: undefined,
  _agent: false,
  _formData: null,
  method: 'POST',
  url: 'https://localhost:44359/api/issues',
  _header:
   { 'user-agent': 'GitHub-Hookshot/20c7c42',
     'content-type': 'application/json',
     host: 'smee.io',
     connection: 'close',
     accept: '*/*',
@issue-label-bot

This comment has been minimized.

Copy link

commented Jul 28, 2019

Issue Label Bot is not confident enough to auto-label this issue. See dashboard for more details.

@sushilbh

This comment has been minimized.

Copy link

commented Jul 30, 2019

If you are running on localhost
smee --url https://smee.io/xxxxxx --path /github-webhook/ --port 44359

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.