Skip to content
This repository has been archived by the owner on Mar 3, 2020. It is now read-only.

Allow ignoring of SSL certificate warnings #152

Closed
wants to merge 1 commit into from
Closed

Allow ignoring of SSL certificate warnings #152

wants to merge 1 commit into from

Conversation

dmacvicar
Copy link

This variable is used by people together with Firefox/webdriver to ignore warnings when using self signed certificates.

This workaround should fix the issue #16 for people doing remote testing with a http to https redirect.

I dont have a test yet. I am not sure ow this can be tested with a rack app, as the bugs shows up when using Capybara.app_host with remote testing. Ideas for a test welcomed.

Also I havent documented it yet, but if the README.md is ok, I can add it.

This variable is used by people together with webdriver
to ignore warnings when using self signed certificates.

This workaround should fix the issue #16 for people doing remote testing
with a http to https redirect.
@@ -8,12 +8,29 @@ NetworkAccessManager::NetworkAccessManager(QObject *parent):QNetworkAccessManage

QNetworkReply* NetworkAccessManager::createRequest(QNetworkAccessManager::Operation oparation, const QNetworkRequest &request, QIODevice * outgoingData = 0) {
QNetworkRequest new_request(request);

// emulate Firefox, allowing to disable certificate
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I prefer breaking out into self-describing methods to using comments.

@jferris
Copy link
Member

jferris commented Sep 15, 2011

Thanks for the patch. I had a couple comments on the code. Also, capybara-webkit is 100% test-driven, so we'd need a test verifying that this works correctly.

@dmacvicar
Copy link
Author

I will look at the comments. Thanks.

What kind of test are you expecting? This works for remote testing, so a test will mean embedding a webserver that supports SSL and making a connection during the test. If that is ok...

@dmacvicar dmacvicar closed this Sep 16, 2011
@dmacvicar
Copy link
Author

I am not very familiar with how the Capybara driver interface is. It receives a Rack app directly in the constructor, and it is Capybara who does the work of giving the driver a "remote" rack app.

I could try to simulate this using Webrick with SSL in the testcase. If you know an easier way, let me know.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants