Git Product home page Git Product logo

Comments (6)

remy avatar remy commented on June 3, 2024

Sounds good, can you send a pull request for that change and I'll happily
merge in.

On Monday, July 14, 2014, Housseyn Guettaf [email protected] wrote:

curl -d '{"copyright":"myname"}' http://name.mit-license.org
This seems to be a permanent failure on my machine (see version bellow)

I'm guessing this is the problem
property_exists($data, 'copyright')

I'm wondering why your checking the object rather than as an array with
isset() ?
Something like this:

$data = json_decode(file_get_contents('php://input'),true);
if (!isset($data['copyright']) {
Throw new Exception('>>> JSON requires "copyright" property and value');
}

Thank you

--Version information

curl 7.20.0 (i386-pc-win32) libcurl/7.20.0 OpenSSL/0.9.8o zlib/1.2.3
Protocols: dict file ftp ftps http https imap imaps ldap pop3 pop3s rtsp
smtp smtps telnet tftp
Features: AsynchDNS Largefile NTLM SSL libz


Reply to this email directly or view it on GitHub
#532.

— Remy

from mit-license.

ghousseyn avatar ghousseyn commented on June 3, 2024

I've created a pull request with a patch for the issue. Checking the object was not the problem but rather the behavior of windows terminal not handling single quotes as quotes.

This should work now (mind the single quotes)

curl -d "{'copyright':'myname'}" http://name.mit-license.org

instead of:

curl -d '{"copyright":"myname"}' http://name.mit-license.org

Escaping the double quotes on windows would achieve the same thing
for your README (may be) you can add that this would also work
curl -d "{"copyright":"myname"}" http://name.mit-license.org

I didn't test it but I believe linux Curl calls won't have a problem

from mit-license.

benniemosher avatar benniemosher commented on June 3, 2024

@remy It looks like you committed a patch for this. Should we go ahead and close out this issue then? @ghousseyn Does your issue appear to be solved with the patch that @remy submitted?

from mit-license.

nikulifuturz avatar nikulifuturz commented on June 3, 2024

@remy how to create own MIT License URL can you please guide me on same.

Eg : http://rem.mit-license.org

from mit-license.

Richienb avatar Richienb commented on June 3, 2024

@nikulifuturz Go here then name the file to anything but end it with .json (for example: richienb.json) and insert your configuration.

For example, my configuration is:

{
  "copyright": "Richie Bendall, https://www.richie-bendall.ml",
  "url": "https://www.richie-bendall.ml",
  "email": "[email protected]",
  "format": "html",
  "gravatar": true,
  "theme": "material-indigo"
}

from mit-license.

Richienb avatar Richienb commented on June 3, 2024

It now seems that this issue has been fixed. If not, #1355 should further fix things.

from mit-license.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.