13
votes
Accepted
Decided to update HttpWebRequest to HttpClient
var postResponse = _client.SendAsync(httpRequest2);
var postResult = postResponse.Result.Content.ReadAsStringAsync().Result;
Never use tasks like this, it leads to ...
4
votes
Accepted
Always keep https in url
If the request is already being served over HTTPS, then it would be a good idea to add a Strict-Transport-Security header to the response. ...
3
votes
Userscript to redirect insecure pages to HTTPS
Overview
Pass global variables as parameters to IIFE to make your code more independent and clear
Use addEventListener method to follow recommended way of ...
3
votes
Accepted
HSTS Recommendations in .htaccess
There are two aspects to HTTP Strict Transport Security (HSTS):
Implementing HSTS on your site.
Submitting your already HSTS enabled site to the HSTS preload list. This is where the "list of ...
3
votes
URL parser in C
Just some minor things in your code. Is a bit strange that you have a function call free_url and you dont have one called init_url where you alloc and do the memset. My suggestion is that you have ...
3
votes
Accepted
.htaccess Recommendations
https://gtmetrix.com/ notes that redirects are the largest culprit in slowing down my page loads
gtmetrix.com's "suggestion" in this regard is arguably &...
3
votes
Decided to update HttpWebRequest to HttpClient
I don't want to repeat Blindly's observations (and those that have spotted under the comment section).
I would like to suggest other improvement areas:
Constructor
You are using instance constructor ...
3
votes
Accepted
Reading a date from the start of a text webpage from github to determine if the program is fully updated
Overall, the code is structured and easy to follow. Some of the remarks below can probably be ignored in the context of this small program, they only become more important when dealing with a larger ...
2
votes
Always keep https in url
Documentation on HTTPS key says that it indicates the protocol was used when its value is not empty and is not equal to 'off' (...
1
vote
Accepted
HTTP scraper for Python Package
I tend to be pretty happy with requests defaults,
but I imagine you need specific retry behavior,
so I won't comment on that.
...
1
vote
A C++ library that sends and receives data using HTTPS or HTTP
I notice you have a lot of lines like
if(Website::url.protocol =="http")
that is, comparing the string against a ...
1
vote
A C++ library that sends and receives data using HTTPS or HTTP
First impression
Well I spend some time and while still there many issues left lets get to the most urgent ones:
The most important rules in software development are divide&conquer, you have one ...
1
vote
Accepted
Understanding htaccess redirect to HTTPS and WWW
The code above works as expected. Why isn't the code in the next format, as it does the same thing? Is any difference ?
...
1
vote
Accepted
Speeding up HTTPS API Call helper method
General Feedback
There is a lot of work going on in the FetchDocumentsAndBuildList Method. Consider breaking it up into smaller methods that make the main method ...
1
vote
Accepted
Simple function to Http GET some data
The core of your code can be replaced by the following code:
...
1
vote
Accepted
HTTP scraper efficiency with multiprocessing
Reading File
Here is a tip, while reading, the r is optional
f = open(r'\h.csv',"r")
can be written as
...
1
vote
Handling HTTP status messages and multiple returns
If you're going to drop in a comment block for function documentation, fill it out. Otherwise, delete it.
Generally you shouldn't import on the inside of a function....
1
vote
Accepted
Unlist all NuGet packages but the last version
If you are making multiple requests to the same host, it is usually faster to open a requests.Session. This will re-use the connection to the server and you can ...
1
vote
Accepted
Actively writing an HTTPS webserver in Python 3
When importing names from a location (module, package, dynamic library, ...), don't mix multiple locations on a single line. That is, this:
import os, ssl
... ...
1
vote
Redirecting HTTP requests to HTTPS
Since your actual machines are being handled by the Cloudflare based forwarding, you can let them handle the enforced SSL and www-prefixing rules instead.
However, ...
Only top scored, non community-wiki answers of a minimum length are eligible