kandi background
Explore Kits

curl-android | curl for android demo | Command Line Interface library

 by   liudongmiao Java Version: Current License: Non-SPDX

 by   liudongmiao Java Version: Current License: Non-SPDX

kandi X-RAY | curl-android Summary

curl-android is a Java library typically used in Utilities, Command Line Interface applications. curl-android has no bugs, it has no vulnerabilities and it has low support. However curl-android build file is not available and it has a Non-SPDX License. You can download it from GitHub.
curl for android demo. how to generate libcurl: 0. download aosp (part of it should be ok). libcurl.so size: (default is ftp, https with ares) https: ~169K (including http, https) ares: ~28K (adding to https, with ares support) ipv6: ~0K (no extra size) +full: ~278K (all protocols, with ares).
Support
Support
Quality
Quality
Security
Security
License
License
Reuse
Reuse

kandi-support Support

  • curl-android has a low active ecosystem.
  • It has 91 star(s) with 45 fork(s). There are 9 watchers for this library.
  • It had no major release in the last 6 months.
  • There are 2 open issues and 4 have been closed. On average issues are closed in 196 days. There are no pull requests.
  • It has a neutral sentiment in the developer community.
  • The latest version of curl-android is current.
curl-android Support
Best in #Command Line Interface
Average in #Command Line Interface
curl-android Support
Best in #Command Line Interface
Average in #Command Line Interface

quality kandi Quality

  • curl-android has 0 bugs and 12 code smells.
curl-android Quality
Best in #Command Line Interface
Average in #Command Line Interface
curl-android Quality
Best in #Command Line Interface
Average in #Command Line Interface

securitySecurity

  • curl-android has no vulnerabilities reported, and its dependent libraries have no vulnerabilities reported.
  • curl-android code analysis shows 0 unresolved vulnerabilities.
  • There are 2 security hotspots that need review.
curl-android Security
Best in #Command Line Interface
Average in #Command Line Interface
curl-android Security
Best in #Command Line Interface
Average in #Command Line Interface

license License

  • curl-android has a Non-SPDX License.
  • Non-SPDX licenses can be open source with a non SPDX compliant license, or non open source licenses, and you need to review them closely before use.
curl-android License
Best in #Command Line Interface
Average in #Command Line Interface
curl-android License
Best in #Command Line Interface
Average in #Command Line Interface

buildReuse

  • curl-android releases are not available. You will need to build from source code and install.
  • curl-android has no build file. You will be need to create the build yourself to build the component from source.
  • curl-android saves you 381 person hours of effort in developing the same functionality from scratch.
  • It has 907 lines of code, 80 functions and 8 files.
  • It has low code complexity. Code complexity directly impacts maintainability of the code.
curl-android Reuse
Best in #Command Line Interface
Average in #Command Line Interface
curl-android Reuse
Best in #Command Line Interface
Average in #Command Line Interface
Top functions reviewed by kandi - BETA

kandi has reviewed curl-android and discovered the below as its top functions. This is intended to give you an instant insight into curl-android implemented functionality, and help decide if they suit your requirements.

  • Get url from dns
    • Initializes the instance .
      • Reads the info and writes it to the StringBuffer
        • Retrieves the forms for the URL .
          • Retrieve the Retrive API .
            • Get info from the given CURL .
              • Use this method to set an option on an HTTP connection .

                Get all kandi verified functions for this library.

                Get all kandi verified functions for this library.

                curl-android Key Features

                generate libc, libssl, liblog, and so shell> make libssl liblog

                edit jni/configure.sh, change the default settings: read the script carefully..normally you can keep it as is

                run curl-android/jni/configure.sh if there are any error, check and fix...

                generate libcurl shell> ndk-build ANDROID_SOURCE=$ANDROID_SOURCE

                strip debug from libcurl shell> arm-eabi-strip -g /path/to/libcurl.so

                curl-android Examples and Code Snippets

                Community Discussions

                Trending Discussions on curl-android
                • libcurl cookie expiry on android
                • Building libcurl for Android in Windows or Ubuntu
                Trending Discussions on curl-android

                QUESTION

                libcurl cookie expiry on android

                Asked 2019-Jul-03 at 14:45

                I am seeing weird behavior with libcurls cookie engine under android, while it works properly in iOS.

                The parsing of the cookies expiry date seems not to work in Android when the expiry year is 2038 or higher. I am aware of the int overflow problem with unix timestamps, but that should only occur on January 19th of 2038. With libcurl, as soon as I go to January 1st 2038 00:00 AM the issue occurs.

                The following is not the exact original code, because that is more complex. But the cookie strings and curl calls are exactly the same.

                // ...create the curl handle...
                
                // Add test cookies in Set-Cookie syntax, because the issue seems to have to do with expiry parsing
                static const std::string border = "Tue, 19-Jan-2087 03:14:08 GMT";
                static const std::string borderP1 = "Fri, 01-Jan-2038 00:00:00 GMT";
                static const std::string borderM1 = "Thu, 31-Dec-2037 23:59:59 GMT";
                curl_easy_setopt(curlHandle, CURLOPT_COOKIELIST, ("Set-Cookie: my1=border;Domain=10.101.32.24;Path=/;Expires=" + border).c_str());
                curl_easy_setopt(curlHandle, CURLOPT_COOKIELIST, ("Set-Cookie: my2=borderP1;Domain=10.101.32.24;Path=/;Expires=" + borderP1).c_str());
                curl_easy_setopt(curlHandle, CURLOPT_COOKIELIST, ("Set-Cookie: my3=borderM1;Domain=10.101.32.24;Path=/;Expires=" + borderM1).c_str());
                
                // Add another cookie in netscape syntax to compare (this one expires on July 10, 3145 9:20:00 AM)
                curl_easy_setopt(curlHandle, CURLOPT_COOKIELIST, "10.101.32.24\tFALSE\t/\tFALSE\t37095873600\ttest\tcookie")
                
                // Code to print all cookies known to curl for test purposes:
                
                struct curl_slist *cookies;
                curl_easy_getinfo(curlHandle, CURLINFO_COOKIELIST, &cookies);
                for (auto c = cookies; c; c = c->next) {
                    LogStream::debug("Cookie") << c->data;
                }
                curl_slist_free_all(cookies);
                

                The resulting lines in the log look like this:

                Cookie: 10.101.32.24    FALSE   /   FALSE   0   my1 border
                Cookie: 10.101.32.24    FALSE   /   FALSE   0   my2 borderP1
                Cookie: 10.101.32.24    FALSE   /   FALSE   2145916799  my3 borderM1
                Cookie: 10.101.32.24    FALSE   /   FALSE   37095873600 test    cookie
                

                So for the first 2 cookies, which are year 2038 or older, the expiry results in 0. This means they are treated as session cookies, which is bad for me. Weirdly, this does not seem to be caused by 32 bit int overflow, because with the netscape syntax, much larger expiry values are supported.

                I can't share the exact build setup for libcurl, but it was derived from the scripts used here and is still fairly similar: https://github.com/gcesarmza/curl-android-ios . We use this setup to build iOS and Android binaries of libcurl (version 7.62.0). Again, with the iOS binaries it works fine (all cookies have correct expiry).

                In the actual code I also validate the return of curl_easy_setopt and it's successfull. If you need more of the setup code I can try to put together a more complete example, but it will take a bit of time.

                Does anyone know what could cause this?

                ANSWER

                Answered 2019-Jul-03 at 14:45

                curl_setopt calls Curl_cookie_add, which in turn calls curl_getdate for "Set-Cookie"-style input. This function eventually ends up here with the following code:

                /* a signed 32 bit time_t can only hold dates to the beginning of 2038 */
                if(yearnum > 2037) {
                  *output = TIME_T_MAX;
                  return PARSEDATE_LATER;
                }
                

                Source https://stackoverflow.com/questions/56869205

                Community Discussions, Code Snippets contain sources that include Stack Exchange Network

                Vulnerabilities

                No vulnerabilities reported

                Install curl-android

                You can download it from GitHub.
                You can use curl-android like any standard Java library. Please include the the jar files in your classpath. You can also use any IDE and you can run and debug the curl-android component as you would do with any other Java program. Best practice is to use a build tool that supports dependency management such as Maven or Gradle. For Maven installation, please refer maven.apache.org. For Gradle installation, please refer gradle.org .

                Support

                For any new features, suggestions and bugs create an issue on GitHub. If you have any questions check and ask questions on community page Stack Overflow .

                Find more information at:

                Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                over 650 million Knowledge Items
                Find more libraries
                Reuse Solution Kits and Libraries Curated by Popular Use Cases
                Explore Kits

                Save this library and start creating your kit

                Clone
                • https://github.com/liudongmiao/curl-android.git

                • gh repo clone liudongmiao/curl-android

                • git@github.com:liudongmiao/curl-android.git

                Share this Page

                share link

                See Similar Libraries in

                Consider Popular Command Line Interface Libraries
                Try Top Libraries by liudongmiao
                Compare Command Line Interface Libraries with Highest Support
                Compare Command Line Interface Libraries with Highest Quality
                Compare Command Line Interface Libraries with Highest Security
                Compare Command Line Interface Libraries with Permissive License
                Compare Command Line Interface Libraries with Highest Reuse
                Find, review, and download reusable Libraries, Code Snippets, Cloud APIs from
                over 650 million Knowledge Items
                Find more libraries
                Reuse Solution Kits and Libraries Curated by Popular Use Cases
                Explore Kits

                Save this library and start creating your kit