Invalid http response 634, 638 - Github webhook - ruby

I have a github webhook, it send a post to the url I have set which is not a problem. I have this weird error which I cant find anywhere. It says
Invalid HTTP Response: 634
There is no definition for Response code 634 anywhere? Anyone have any idea about this?
I'm using ruby sinatra to fetch the post and ngrok as my server on localhost itself. Initial requests worked fine.
Once I added code to write the post received to a file in my ruby script, it started giving me this 634 response code, however, it works fine. I'm just curious as to what does the error code imply. I have no issues with my code, it works fine.
Let me know if you need more information.
EDIT:
Earlier one was the response I received when I pushed some changes done to a text file.
Based on mudasobwa's comment, I tried again. This time I checked in a .java file and weirdly I get a different Invalid response 638 this time
I'm not sure whats going on. My server is able to receive the post anyway though.

Related

Jmeter 5.4.1 failing for 500 response - Internal Server Error - while trying to login

I have recorded script by using Blazemeter. It worked fine for the first day. Now when I am running the same jmx file, it gives me Response code 500.
Please help me to understand what I did wrong.
Sampler Result:
This is how my parameters are posted at login.
BodyData tab does not open for me.
Login parameters:
When you say that it ran successfully yesterday and today it is failing, there is some parameter like session / token that was valid for like 12 hours / 24 hours and now it has expired. You will need to identify that and parameterize it. I cannot help you much right now as I don't know what is that variable value and how does it differ each day. Perhaps checking with developers will help.
It seems you're trying to test a secure web service and most probably there is a current timestamp included somewhere in your request body so the request was passing when it was more or less "recent" and after some time the request became invalid due to expiration.
I cannot state where exactly the problem is and how to fix it by looking at partial screenshot so I can give you only a generic piece of advice: consider using WS-Security Plugin for JMeter for adding the relevant SOAP header containing up-to-date information like timestamp and eventually a signature.
More information: Running SOAP WS-Security Load Tests in JMeter

What does "200 connection established" HTTP response status code mean?

I know about 200 OK but what is 200 connection established?
To give some background, I am testing out XMLHTTPRequest in an old firefox browser(version 26 to be exact) and I see this as the response code. I am not able to view either the response headers or body so there definitely seems to be some issue. In newer browsers I see 200 OK and there are no issues with the response. I want to understand what this response code means so that I can debug.
In addition I would like to know if this code indicate a problem with the client or server?
Thanks for any help.
The status code is just "200". What follows is the "reason phrase", and it's up to the server to make one up. Note that in HTTP/2 and /3, there is no reason phrase at all.
So; just ignore it.

Get request with curl works but Net::HTTP and OpenURI fail

My Rails application regularly polls partners' ICS files and sometimes it fails for no reason whatsoever. When I do:
curl https://www.airbnb.es/calendar/ical/234892374.ics?s=23412342323
(params #'s faked here)
I get output matching the content of the ICS file. Just opening it in the browser works fine as well.
When I use:
Net::HTTP.get(URI(a.ics_link))
I get a "503 Service Temporarily Unavailable" response. I also tried the same with OpenURI with similar results.
Why is it that the server is treating requests from curl or a browser differently?
Is there some way to get Ruby to get around this?
It's an https issue... not sure why, but switch your url in Ruby to https and it should work.

Fixing 416 error: HTTParty

Getting a 416 error when trying to GET a website with HTTParty. Works just fine in the browser.
I have never gotten this error before, so I went online and found this:
It occurs when the server is unable to fulfill the request. This may
be, for example, because the client asked for the 800th-900th bytes of
a document, but the document is only 200 bytes long.
The request includes a Range request-header field, and not any of the
range-specifier values in this field overlaps the current extent of
the selected resource, and also the request does not include an
If-Range request-header field.
Wondering if anyone has gotten 416 with HTTParty before and if there is a way to prevent this form happening. Thanks
Example website where error occurs:
http://www.bizjournals.com/jacksonville/blog/morning-edition/2014/07/teens-make-up-less-of-summer-workforce-than-ever.html
It appears that bizjournals is able to detect you are a bot (not accessing in the browser) and therefore returns a 416.
irb(main):005:0> HTTParty.get('http://www.bizjournals.com/jacksonville/blog/morning-edition/2014/07/teens-make-up-less-of-summer-workforce-than-ever.html').body
=> "........As you were browsing <strong>http://www.bizjournals.com</strong> something about your browser made us think you were a bot. There are a few reasons this might happen........"
You could either ask bizjournals to allow you to make requests or try to change the headers to make bizjournals think you are not a bot.

Ajax getting 412 (Precondition Failed) sometimes

I am writing a website with Struts and Tomcat as the server.
On a page there's an ajax post request using jQuery (not cross-domain). The returned value is plain html.
The problem is, I sometimes (not always, not even frequent) get 412 (Precondition Failed) error. What could be the cause of this unstable error?
I'm posting an answer because I've just had this issue today. It's obviously an update to Mod Security in my case.
I was sending data to the server via AJAX and some Javascript which was part of this message caused the 412. It turned out to be the word HTML (I was passing element.innerHTML within the code)
ModSecurity treats that as a potential threat by the looks of it. For a quick fix I replaced all HTML strings with H%T%M%L and reversed the process on the server and it's now running.
You've probably long-since solved this but posting in case it's useful for anyone else.
Just today i was facing the same problem "412 Precondition Failed".
It is a Codeigntier app that uploads audio and Image files.
Till now a lot of files uploaded through the Ajax File uploader. But today i file was not uploading and through chrome Inspect > Network i found that error 412 Precondition Failed.
I re-uploaded the file so many file by changing my ajax script multiple times.
Suddenly some special character caught my attention. I renamed the file and tried to re-upload. Trust me it worked.
Before:
AFTER:
I don't have proper explanation but it works for me.
Thanks

Resources