PrimeIntellect/SWE-rebench-V2 huggingface dataset:
Repository: pinojs/pino (js)

Issue:
obj.hasOwnProperty is not a function
Found this deep inside our server logs

```
obj.hasOwnProperty is not a function
    at EventEmitter.asJson (/Users/ronagy/Projects/github/nxtedition/nxt-storage/node_modules/pino/pino.js:175:15)
    at EventEmitter.Pino.write (/Users/ronagy/Projects/github/nxtedition/nxt-storage/node_modules/pino/pino.js:224:16)
    at EventEmitter.LOG (/Users/ronagy/Projects/github/nxtedition/nxt-storage/node_modules/pino/lib/tools.js:116:10)
```

Not sure how to reproduce it.

Pull request:
fix for null proto closes #180
Master:

Pino average: 271.8075
PinoExreme average: 132.1225

Branch: 

Pino average: 271.576
PinoExreme average: 135.951



Patch:
diff --git a/pino.js b/pino.js
index cf6de2b..04c0edc 100644
--- a/pino.js
+++ b/pino.js
@@ -172,7 +172,7 @@ Pino.prototype.asJson = function asJson (obj, msg, num) {
     }
     for (var key in obj) {
       value = obj[key]
-      if (obj.hasOwnProperty(key) && value !== undefined) {
+      if ((!obj.hasOwnProperty || obj.hasOwnProperty(key)) && value !== undefined) {
         value = this.stringify(this.serializers[key] ? this.serializers[key](value) : value)
         if (value !== undefined) {
           data += ',"' + key + '":' + value


Test patch:
diff --git a/test/basic.test.js b/test/basic.test.js
index 3ff7978..001fb27 100644
--- a/test/basic.test.js
+++ b/test/basic.test.js
@@ -377,3 +377,21 @@ test('normalize number to string with an object', function (t) {
 
   instance.info({ answer: 42 }, 1)
 })
+
+test('handles objects with null prototype', function (t) {
+  var instance = pino(sink(function (chunk, enc, cb) {
+    delete chunk.time
+    t.deepEqual(chunk, {
+      pid: pid,
+      hostname: hostname,
+      level: 30,
+      test: 'test',
+      v: 1
+    })
+    t.end()
+    cb()
+  }))
+  var o = Object.create(null)
+  o.test = 'test'
+  instance.info(o)
+})
Repository: xenolf/lego (go)

Issue:
httpreq endpoint url
I tried to use dns verification with httpreq modul. My setup forces me to have my endpoint HTTPREQ_ENDPOINT set to: `https://example.com/api/acme/`, but currently it will only request `https://example.com/present` instead of `https://example.com/api/acme/present`.

https://github.com/xenolf/lego/blob/master/providers/dns/httpreq/httpreq.go#L161

Pull request:
httpreq: Endpoint with path.
Fixes #780 

Patch:
diff --git a/providers/dns/httpreq/httpreq.go b/providers/dns/httpreq/httpreq.go
index f6a1fe0c..af1b73a7 100644
--- a/providers/dns/httpreq/httpreq.go
+++ b/providers/dns/httpreq/httpreq.go
@@ -10,6 +10,7 @@ import (
 	"net/http"
 	"net/url"
 	"os"
+	"path"
 	"time"
 
 	"github.com/xenolf/lego/challenge/dns01"
@@ -158,7 +159,8 @@ func (d *DNSProvider) doPost(uri string, msg interface{}) error {
 		return err
 	}
 
-	endpoint, err := d.config.Endpoint.Parse(uri)
+	newURI := path.Join(d.config.Endpoint.EscapedPath(), uri)
+	endpoint, err := d.config.Endpoint.Parse(newURI)
 	if err != nil {
 		return err
 	}


Test patch:
diff --git a/providers/dns/httpreq/httpreq_test.go b/providers/dns/httpreq/httpreq_test.go
index 7b64d297..4ca4103d 100644
--- a/providers/dns/httpreq/httpreq_test.go
+++ b/providers/dns/httpreq/httpreq_test.go
@@ -6,6 +6,7 @@ import (
 	"net/http"
 	"net/http/httptest"
 	"net/url"
+	"path"
 	"testing"
 
 	"github.com/stretchr/testify/require"
@@ -104,6 +105,7 @@ func TestNewDNSProvider_Present(t *testing.T) {
 		mode          string
 		username      string
 		password      string
+		pathPrefix    string
 		handler       http.HandlerFunc
 		expectedError string
 	}{
@@ -111,6 +113,11 @@ func TestNewDNSProvider_Present(t *testing.T) {
 			desc:    "success",
 			handler: successHandler,
 		},
+		{
+			desc:       "success with path prefix",
+			handler:    successHandler,
+			pathPrefix: "/api/acme/",
+		},
 		{
 			desc:          "error",
 			handler:       http.NotFound,
@@ -150,11 +157,11 @@ func TestNewDNSProvider_Present(t *testing.T) {
 			t.Parallel()
 
 			mux := http.NewServeMux()
-			mux.HandleFunc("/present", test.handler)
+			mux.HandleFunc(path.Join("/", test.pathPrefix, "present"), test.handler)
 			server := httptest.NewServer(mux)
 
 			config := NewDefaultConfig()
-			config.Endpoint = mustParse(server.URL)
+			config.Endpoint = mustParse(server.URL + test.pathPrefix)
 			config.Mode = test.mode
 			config.Username = test.username
 			config.Password = test.password