Skip to content
This repository was archived by the owner on Feb 5, 2024. It is now read-only.
This repository was archived by the owner on Feb 5, 2024. It is now read-only.

HTTP Proxy support. Advice? #85

@raypedrina

Description

@raypedrina

Hi,
I work for a Government department in Australia and we're implementing a Drupal content publishing POC using the replication module for Drupal, which in turn depends on the Relaxedws module which in turn comprises/contains this CouchDB client code.
We're implementing the client to connect from our internal environment out to a cloud based Drupal instance but due to security constraints HTTP(S) traffic all must go via a HTTP proxy.
Modifying the Socket client for this purpose seemed a little on the difficult/time consuming side, so I attempted to use the StreamClient. I added proxy arguments into the Stream Context then changed the Request Function to null the httpFilePointer so that each call to checkConnection actually performs a request.
It now goes through our http proxy and in practice it functions correctly. I did however wonder if there was a specific reason for having the Socketclient over the StreamClient whether its compatibility with previous PHP/performance/an issue we just haven't hit yet. If anyone has a more intimate knowledge of the code and can shed some light on it that would be great.
Happy to post the code up, in time just currently its all pretty hardcoded and I kind of just replaced the contents of the SocketClient to get it going without further modification.
Thanks for reading.

Cheers,
Ray

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions