Skip to content

Instantly share code, notes, and snippets.

@fdmanana
fdmanana / gist:1034294
Created June 19, 2011 13:46
replicator always retry on attachment streaming failure
diff --git a/src/couchdb/couch_api_wrap.erl b/src/couchdb/couch_api_wrap.erl
index aa481c7..63e607a 100644
--- a/src/couchdb/couch_api_wrap.erl
+++ b/src/couchdb/couch_api_wrap.erl
@@ -597,7 +597,7 @@ doc_from_multi_part_stream(ContentType, DataFun) ->
started ->
unlink(Parser),
exit(Parser, kill),
- restart_remote_open_doc_revs();
+ restart_att_streaming();
@fdmanana
fdmanana / gist:1034290
Created June 19, 2011 13:40
replicator, shared/dedicated httpc pool configuration
diff --git a/src/couchdb/couch_api_wrap.erl b/src/couchdb/couch_api_wrap.erl
index 63e607a..8fcd08f 100644
--- a/src/couchdb/couch_api_wrap.erl
+++ b/src/couchdb/couch_api_wrap.erl
@@ -101,7 +101,6 @@ db_open(DbName, Options, Create) ->
end.
db_close(#httpdb{httpc_pool = Pool}) ->
- unlink(Pool),
ok = couch_httpc_pool:stop(Pool);
@fdmanana
fdmanana / gist:1006926
Created June 3, 2011 18:50
Multiple CouchDB mappers
diff --git a/src/couchdb/Makefile.am b/src/couchdb/Makefile.am
index f64a036..afc766c 100644
--- a/src/couchdb/Makefile.am
+++ b/src/couchdb/Makefile.am
@@ -88,6 +88,7 @@ source_files = \
couch_view_compactor.erl \
couch_view_updater.erl \
couch_view_group.erl \
+ couch_view_mapper.erl \
couch_db_updater.erl \
diff --git a/lib/ssl/src/ssl_broker.erl b/lib/ssl/src/ssl_broker.erl
index 178fb5f..7187b1f 100644
--- a/lib/ssl/src/ssl_broker.erl
+++ b/lib/ssl/src/ssl_broker.erl
@@ -608,6 +608,19 @@ handle_info({tcp, Socket, Data},
{noreply, St}
end;
+handle_info({tcp, Socket, Data},
+ #st{active = Active, collector = Collector, status = open,
diff --git a/lib/public_key/asn1/OTP-PKIX.asn1 b/lib/public_key/asn1/OTP-PKIX.asn1
index c0cf440..ad70419 100644
--- a/lib/public_key/asn1/OTP-PKIX.asn1
+++ b/lib/public_key/asn1/OTP-PKIX.asn1
@@ -302,18 +302,25 @@ SupportedPublicKeyAlgorithms PUBLIC-KEY-ALGORITHM-CLASS ::= {
-- DSA Keys and Signatures
+
+ DSAParams ::= CHOICE
diff --git a/lib/public_key/src/pubkey_cert.erl b/lib/public_key/src/pubkey_cert.erl
index 0ccc747..b53f8e7 100644
--- a/lib/public_key/src/pubkey_cert.erl
+++ b/lib/public_key/src/pubkey_cert.erl
@@ -176,9 +176,15 @@ validate_revoked_status(_OtpCert, _Verify, AccErr) ->
validate_extensions(OtpCert, ValidationState, Verify, AccErr) ->
TBSCert = OtpCert#'OTPCertificate'.tbsCertificate,
- Extensions = TBSCert#'OTPTBSCertificate'.extensions,
- validate_extensions(Extensions, ValidationState, no_basic_constraint,
-module(qteste).
-compile(export_all).
run() ->
process_flag(trap_exit, true),
{ok, Q} = couch_work_queue:new(
[{max_size, 8}, {max_items, 2}, {multi_workers, true}]),
C1 = consumer("Consumer_1", Q),
C2 = consumer("Consumer_2", Q),
diff --git a/etc/couchdb/default.ini.tpl.in b/etc/couchdb/default.ini.tpl.in
index 6b70777..6aedace 100644
--- a/etc/couchdb/default.ini.tpl.in
+++ b/etc/couchdb/default.ini.tpl.in
@@ -17,7 +17,10 @@ uri_file = %localstatelibdir%/couch.uri
port = 5984
bind_address = 127.0.0.1
max_connections = 2048
-authentication_handlers = {couch_httpd_oauth, oauth_authentication_handler}, {couch_httpd_auth, cookie_authentication_handler}, {couch_httpd_auth, default_authentication_handler}
+; authentication handler which uses Apple Directory Services
% Licensed under the Apache License, Version 2.0 (the "License"); you may not
% use this file except in compliance with the License. You may obtain a copy of
% the License at
%
% http://www.apache.org/licenses/LICENSE-2.0
%
% Unless required by applicable law or agreed to in writing, software
% distributed under the License is distributed on an "AS IS" BASIS, WITHOUT
% WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the
% License for the specific language governing permissions and limitations under
fdmanana@fdmanana-mac ~/git/hub/couchdb (1.0.x)> git diff --cached src/couchdb/Makefile.am
diff --git a/src/couchdb/Makefile.am b/src/couchdb/Makefile.am
index 308a383..250ab39 100644
--- a/src/couchdb/Makefile.am
+++ b/src/couchdb/Makefile.am
@@ -27,6 +27,8 @@ CLEANFILES = $(compiled_files) $(doc_base)
# CLEANFILES = $(doc_modules) edoc-info
source_files = \
+ couch_apple_ds_auth.erl \