Introduce a patch to fix use of SSL on webmachine, and add a little README explaining what all the patches are for since they seem to be multiplying.

This commit is contained in:
Simon MacMullen 2011-03-14 12:16:51 +00:00
parent cbf3f5859b
commit f63538c0f3
3 changed files with 30 additions and 2 deletions

View File

@ -29,8 +29,11 @@ $(LIB_PACKAGE_DIR): $(CHECKOUT_DIR)
$(CHECKOUT_DIR):
rm -rf $@-tmp
hg clone -r $(REVISION) $(HG_UPSTREAM) $@-tmp
cd $@-tmp && patch -p1 < ../unrebar.patch && patch -p1 < ../uneunit.patch && \
patch -p1 < ../10-crypto.patch && cd .. && mv $@-tmp $@
cd $@-tmp && patch -p1 < ../unrebar.patch && \
patch -p1 < ../uneunit.patch && \
patch -p1 < ../10-crypto.patch && \
patch -p1 < ../ssl.patch && \
cd .. && mv $@-tmp $@
%.ez: $(LIB_PACKAGE_DIR)
$(MAKE) -C $(LIB_PACKAGE_DIR) clean all

View File

@ -0,0 +1,13 @@
unrebar.patch
- build with make rather than rebar, to fit into our build / deploy process.
uneunit.patch
- build without eunit, so we can build on R12B-5.
10-crypto.patch
- remove referecnces to the crypto app, so that we can run without it
on platforms where it's hard to get hold of.
ssl.patch
- fix SSL on webmachine, see https://issues.basho.com/show_bug.cgi?id=769
(unresolved at time of writing).

View File

@ -0,0 +1,12 @@
diff -r 0c4b60ac68b4 src/webmachine_request.erl
--- a/src/webmachine_request.erl Tue Jun 15 08:36:55 2010 -0400
+++ b/src/webmachine_request.erl Mon Mar 14 12:09:38 2011 +0000
@@ -92,7 +92,7 @@
case ReqState#wm_reqstate.peer of
undefined ->
Socket = ReqState#wm_reqstate.socket,
- Peer = case inet:peername(Socket) of
+ Peer = case mochiweb_socket:peername(Socket) of
{ok, {Addr={10, _, _, _}, _Port}} ->
case get_header_value("x-forwarded-for") of
{undefined, _} ->